Given two arrays A and B of same size. We can shuffle array A and then we have to minimize the sum of A[i]^B[i] for all i(1,N). Return the minimum sum .

How to solve this problem??

# Minimizing sum of A[i]^B[i]

Looks eerily similar to a problem from an ongoing contest.

1 Like

yeah but contest has been ended

Asked a similar thing earlier