Medium
Every element in nums appears exactly three times except for one, which appears once. Return that single element. O(n) time and O(1) extra space.
nums
Input: nums = [2,2,3,2] Output: 3
Input: nums = [0,1,0,1,0,1,99] Output: 99