Given an array of non-negative integers, consider every subset (including the empty subset) and compute the XOR of that subset's elements. Return the sum of these subset-XOR values. For an empty array the answer is 0.
Input: A JSON object {"nums": [<non-negative integers>]}.
Output: Return the sum over all subsets of the XOR of the subset.
Input: {"nums":[1,3]}
Output: 6
Explanation: Subset XORs 0,1,3,2 sum to 6; OR=3, 3<<1=6.Input: {"nums":[5]}
Output: 5
Explanation: Subsets {} and {5} give 0 and 5 -> sum 5.0 <= len(nums) <= 160 <= nums[i] <= 10^6