Given two integer arrays a and b of equal length n, rearrange b to minimize the sum of a[i] XOR b[perm[i]] for all i. Return the minimum XOR sum. Input: JSON {a, b}.
Input: JSON {a, b}.
Output: Integer.
Input: {"a":[1,2],"b":[2,3]}
Output: 2
Explanation: 1^3 + 2^2 = 2+0 = 2.Input: {"a":[1,0,3],"b":[5,3,4]}
Output: 8
Explanation: Optimal assignment yields XOR sum 8.1 <= n <= 140 <= a[i], b[i] <= 10^7