Majority element in an array