In an array, every number appears twice except for one. Find that number.
Example 1
Input: nums = [4,1,2,1,2]
Output: 4
Explanation: Only the number 4 has no pair.
Output: 4
Explanation: Only the number 4 has no pair.
Example 2
Input: nums = [2,2,1]
Output: 1
Explanation: 1 appears once; all other elements have pairs.
Output: 1
Explanation: 1 appears once; all other elements have pairs.