GlobalLogic interview question

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