Target sum pairs

why other test cases failed

@visheshg2k
hello vishesh
vishesh pls share ur code

sir when i am sending the link of my ide it showing error [Body is too similar to what you recently posted]

@visheshg2k
save ur code on -> https://ide.codingblocks.com/ and then shAare the link

@visheshg2k
when u r printing arr[i] and arr[j] then make sure that first u r printing minimum of arr[i] and arr[j] ,
and then maximum of arr[i] arr[j]

@aman212yadav hey you are trying brute force which will not work here ,instead use another logic.First sort the array and then take two pointer first at first index and second at last index and see that both sum to target or not if not than check sum is less than target than move first pointer forward else move last pointer backward.Hope you get it.

@rishabhmahajan546
bro i m also a ta,
i know he is trying brute force, but his brute force solution has some issue so was telling the same

@visheshg2k hey you are trying brute force which will not work here ,instead use another logic.First sort the array and then take two pointer first at first index and second at last index and see that both sum to target or not if not than check sum is less than target than move first pointer forward else move last pointer backward.Hope you get it.