it is showing only 2 test cases correct.Pl tell the mistake
Array-target sum pairs
@ayush15goel hey ayush there is only one mistake in the code your output in not in sorted order to make the order sorted you have to apply inbulit sort function i.e sort(arr,arr+n);
sir ,not understood
can you pl tell in the code,where I need to make correction
@ayush15goel hey Ayush you can check the changes in line 12 in this link what I trying to say if we run your code for the sample output your output is
1 and 4
3 and 2
but it should be in sorted order
1 and 4
2 and 3
hope now it’s clear to you
thank you,understood now
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.