3. find majority element in array