Return all the values that appear more than len(nums) / 3 times, as a sorted list (each value once). There can be at most two such values. Return [] if there are none.
Example 1
Input:
majority_element_thirds([3, 2, 3])
Output:
[3]
3 appears 2 times and 2 once. n / 3 is 1, so only 3 qualifies.
Example 2
Input:
majority_element_thirds([1, 2, 3, 4])
Output:
[]
Each value appears once, which is not more than 4 / 3.
0 <= len(nums) <= 3 * 10**50 <= nums[i] <= 10**9No results yet
Run your code to check it against the examples, or submit to run every test.