Code not working

i have implimented the pair sum program using the second method discussed in which we use the binary search.

But the code is not working…

hello @kartiksaxena2000 the two pointer approach is different.

prateek bhaiya told 3 approaches in the video, i am implemeting the second approach which uses binary search, I am not implemention the 2 pointer approach

hello @kartiksaxena2000 i have corrected your code and now it is printing the correct result.


if you have any doubt you can ask here.
Happy Learning !!

But can you please tell me what mistake did i do by commenting mistake i did in my code

see line 10 you have to do mid=(high+low)/2.
but you are doing mid=(mid+low)/2 .