- Find the Majority element of an array A[1 ... n]: An array is said to have a majority
- element if more than half of its entries are the same.
- Example :
- Input: {3, 3, 4, 2, 4, 4, 2, 4, 4}
- Output: 4
- Explanation: The frequency of 4 is 5 which is greater than the half of the size
- of the array size.