In the array nums, every number appears exactly three times, except for one number that appears only once.
Find that one number and return it.
Your solution must run in linear time and use only a constant amount of extra space.
Examples
Example 1:
Input: nums = [9,4,9,9]
Output: 4
Explanation: 9 appears three times and 4 appears once.
Example 2:
Input: nums = [7,2,7,2,7,2,11]
Output: 11
Explanation: 7 and 2 appear three times each. 11 appears once.
Example 3:
Input: nums = [-3,8,8,8]
Output: -3
Explanation: The number that appears once can be negative.