i am writing my code by sorting the array and then using 2 pointer to check if its equal to sum or not .
this is my code
Error time limit exceeded
i got my this error resolved but i am having my test case 3 failed
why should we only increment or decrement why not both as we found 1 soln so doing only one will increase the iterations ? what benifit does it make ?
…
if u want u can increment both no issue in that , overall complexity will remain same
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.