Don’t why my one test case is failing
here is the link to the code : https://ideone.com/MB2Uat
Arrays- Target sum pairs : Test case failing
@ayushjain.aj300 hey ayush your code is not working for the test case
5
5
2
3
4
1
6
your output is
1 and 5
2 and 4
3 and 3 but output should be
1 and 5
2 and 4
none of pair will be same
so avoid this do apply a check
if(a[i]!=target-a[i])
I am simply applying staircase search algo on sorted matrix. Don’t know where am I failing. link: https://ideone.com/MB2Uat
@ayushjain.aj300 I already suggest you the changes for the above code and the for staircase search code please verify the
code link and create a new doubt thread.
Alright sir. I posted that comment by mistake
Yes Sir. It has been resolved. Thanks for the help.