Arrays-target-sum-pairs

getting wrong answer in testcase0

Hey @Rakshitgarg99 instead of checking arr[i]<=arr[j] check i < j.

it is giving test case3 also wrong.
is there any better way to do it?

you also need to sort the given array.
please refer to the given code https://ide.codingblocks.com/s/182860

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.