**Solution**

- Solution follows from Majority Vote Algorithm.
- https://discuss.leetcode.com/topic/17564/boyer-moore-majority-vote-algorithm-and-my-elaboration/2

```
class Solution(object):
def majorityElement(self, nums):
"""
:type nums: List[int]
:rtype: List[int]
"""
v1 , v2 = [None, 0] , [None, 0]
for c in nums:
if c == v1[0]:
v1[1] = v1[1] + 1
elif c == v2[0]:
v2[1] = v2[1] + 1
elif v1[1] == 0:
v1 = [c, 1]
elif v2[1] == 0:
v2 = [c , 1]
else:
v1[1] = v1[1] - 1
v2[1] = v2[1] - 1
result = [x for x in [v1[0], v2[0]] if nums.count(x) > len(nums)//3]
return result
```