find mode is solved with O(n)