Question: You are given an array X of n elements. A majority element of X is any element occurring in more than n/2 positions. The only

You are given an array X of n elements. A majority element of X is any element occurring in more than n/2 positions. The only access you have to the array is to compare any two of its elements for equality; hence you cannot sort the array, etc. Design an O(n log n) divide-and-conquer algorithm to find a majority element in X (or determine that no majority element exists)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
