Maximum sum difference between two sorted array elements under one condition
Two sets A and B.  Using i and j only once maximize the ∑(a[i] - b[j]).  Not required to use and i and j.

I don't know if this is a hard proof but  

For $A[i] &gt; B[j]$
∑(a[i]−b[i])  =  ∑(a[i]) - ∑(b[i])

So the problem is reduced to maximize $A[i] &gt; B[j]$
Reverse sorting maximizes the number of $A[i] &gt; B[j]$  

Or another way to say it
maximizes ∑(a[i]) and minimizes ∑(b[i])
Descending sorting maximizes ∑(a[i])
Ascending  sorting minimizes ∑(b[i])