Introduction - If you have any usage issues, please Google them yourself
Specifically, if an array A [1 .. n] more than half of the elements are the same, the array is known as a main element contains. (A) to design an effective algorithm (at least O (n logn)), to determine whether the array contains a primary element, and if so, find out the elements. (For simplicity, assume that n is a power of 2, and n < 150) (b) can give a linear time algorithm? It must be noted that the array may not exist between the elements of the order- that can not be " A [i] <A[j]”的判断,但是可以进行是否相等的判断。