two of the test cases are failing where am I making the mistakes https://ide.codingblocks.com/s/238364
Target sum pairs
hello @utkarsh2504
that two pointer approach works for sorted array.
so first sort ur array and then apply the algorithm
ok also when i wrote it a function for this i was getting only one of the pair what could be the reason behind it ? should i share my code?
yeah pls share after making necessary changes
i made a small mistake while making the function it is working correctly now thnx for assistance
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.