In 4# test case time limit error is shown ,plz debugg my prog,
Arrays-Target Sum Pairs
@akb.tech17 Do it with a single while loop.
Something like this:
while(l<r){
cs= a[l]+a[r];
if(cs>target){
r--;
}
else if(cs==target){
cout<<a[l]<<" and "<<a[r]<<endl;
l++;
r--;
}
else l++;
}