GF interview question

find the majority element in an array

Interview Answer

Anonymous

21 Feb 2018

I used Moore voting algorithm to find the majority element in linear time and constant space