Target sum triplet

i want to know why my code is failing for test case1(tle)…kindly explain this part first rather than giving me your code without explaining my fault.

hi @rabimajumder08
Its giving tle because your code’s time complexity is O(n^3)… try to reduce it using 2 pointer approach…

hi @rabimajumder08
u can refer my code -->

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.