in valentine problem why do we require to sorting both arrays
Why sorting is required here
We need to find absolute difference, we are using greedy approach.
Sort the array and then start comparing or do whatever you want.
How do you plan to do it without sorting?