Amazon interview question

Find majority element in a given array