Question :
To print out all the pairs in ascending order from the array which would produce the given sum.
how do I figure out why the test case is failing? I couldn’t figure out the error/bug in my algorithm.
here is my code :
Question :
To print out all the pairs in ascending order from the array which would produce the given sum.
how do I figure out why the test case is failing? I couldn’t figure out the error/bug in my algorithm.
here is my code :
where was the error in algorithm ?
and what was the error can you elaborate that ?
hi @aryangoel971_1b263dfa601b9409
either u do a brute force way, or if u use 2 pointer method then u will have to keep one pointer at starting and other at end…
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.