Given two arrays of equal length n, rearrange the second array however you like and then sum nums1[i] XOR nums2[i] over all positions. Return the smallest sum achievable over all rearrangements.
Input: A JSON object {"nums1": [<integers>], "nums2": [<integers>]} of equal length.
Output: Return the minimum possible XOR sum.
Input: {"nums1":[1,2],"nums2":[2,3]}
Output: 2
Explanation: Pairing 1 with 3 and 2 with 2 gives 2 + 0 = 2.Input: {"nums1":[1,0,3],"nums2":[5,3,4]}
Output: 8
Explanation: The optimal rearrangement gives an XOR sum of 8.1 <= n <= 140 <= nums1[i], nums2[i] <= 10^7