The array nums has n integers. Find all the values that appear more than ⌊n / 3⌋ times (the symbol ⌊ ⌋ means round down). Return the answer in any order.
Examples
Example 1:
Input: nums = [8,8,8,4,4,6,6,6]
Output: [8,6]
Explanation: Here n = 8, so an element must appear more than 2 times. 8 appears 3 times and 6 appears 3 times. 4 appears only 2 times.
Example 2:
Input: nums = [7]
Output: [7]
Explanation: The only number appears once, which is more than 0.
Example 3:
Input: nums = [4,5,6]
Output: []
Explanation: Here n = 3, so an element must appear more than once. No number does.