DSA Learning Series, Distinct Pairs

This question can be solved by finding minimum of first array and maximum of another and printing pairwise.
But why is the converse not true ? Like finding the maximum of first array and minimum of another and then printing pairwise ? Kindly help me out here.

I have edited the question. Sorry for the inconvenience.


Look for Setter’s Solution

I have updated the question, thanks for replying though.

look this ->
Best solution


1 Like

But why is the converse not true ?

Why do you think that? It is completely true.

I got it, I think I messed up while printing them. Thanks. :slight_smile:

i think o(n) is the solution to it not nlog(n)