you give sorted array num n nonnegative integer integer maximumBit you want perform follow query n timesfind nonnegative integer k 2maximumbit nums0 XOR nums1 XOR XOR numsnumslength1 XOR k maximized k answer ith queryRemove element current array numsReturn array answer answeri answer ith query Example 1input num 0113 maximumbit 2output 0323explanation the query answer follows1st query num 0113 k 0 0 xor 1 xor 1 xor 3 xor 0 32nd query num 011 k 3 0 xor 1 xor 1 xor 3 33rd query num 01 k 2 0 xor 1 xor 2 34th query num 0 k 3 0 xor 3 3example 2input num 2347 maximumbit 3output 5265explanation the query answer follows1st query num 2347 k 5 2 xor 3 xor 4 xor 7 XOR 5 72nd query num 234 k 2 2 xor 3 xor 4 XOR 2 73rd query num 23 k 6 2 xor 3 xor 6 74th query num 2 k 5 2 xor 5 7example 3input num 012257 maximumbit 3output 436467 Constraintsnumslength n1 n 1051 maximumBit 200 numsi 2maximumbitnums sort ascending order