The One Not Tripled
Every value in nums appears exactly three times, except for one value that appears exactly once. Return that value.
Aim to do it with bit counting and no dictionary: look at one bit position at a time.
Example 1
nums [5,9,5,5]
returns 9
5 appears three times and 9 once.
Example 2
nums [4,4,0,4]
returns 0
The single value can be 0.
Constraints
1 <= len(nums) <= 2980 <= nums[i] < 2**31
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.