Given an array, return all elements that appear more than ⌊n/3⌋ times.
Example 1
Explanation: 3 appears twice out of 3 elements, comfortably more than ⌊3/3⌋ = 1 time; 2 appears only once.
Example 2
Explanation: With n = 1, the single element trivially appears more than ⌊1/3⌋ = 0 times.
Example 3
Explanation: n = 2, so the threshold is more than ⌊2/3⌋ = 0 times — both elements qualify.
How would the voting step change if the threshold were more than n/4 instead of n/3?
Code execution is coming soon.