leetcode
169. Majority Element
Solution code
Time complexity: O(n)
Space complexity: O(1)