GlobalLogic Interview Question

Find the majority element in an array in O(n) time complexity.