Given a non-empty array where every element appears exactly twice except for one element that appears once, find that single element. XOR of a value with itself is 0, so XOR-ing everything cancels the pairs.
Input: A JSON object {"nums": [<integers>]} where all but one value appear twice.
Output: Return the element that appears only once.
Input: {"nums":[2,3,5,3,2]}
Output: 5
Explanation: Pairs 2 and 3 cancel, leaving 5.Input: {"nums":[7]}
Output: 7
Explanation: A single element is itself the answer -> 7.1 <= len(nums) <= 10^5array length is odd