229. Majority Element II
https://leetcode.com/problems/majority-element-ii
Python
from collections import Counter
class Solution:
def majorityElement(self, nums: List[int]) -> List[int]:
counts = Counter(nums)
limit = len(nums)/3
result = []
for num, count in counts.items():
if count > limit:
result.append(num)
return result