ucas 2小题
A: Given an array of size n, find the majority element. The majority element is the element that appears more than b n c times.You may assume that the array is non-empty and the majority 2 element always exist in the array. INPUT: Line 1: the length of array. Line 2: the all elements in array and split by spaces OUTPUT: Line 1: A single integer that is the majority element. ...