Target Sum Triplets

problem: https://online.codingblocks.com/player/7730/content/4821?s=1583
soln: https://ide.codingblocks.com/#/s/32758

i am getting the output correct but i think order is the issue in this case so what modifications do i require in my code

https://ide.codingblocks.com/s/33444

I have made the required changes and commented the mistakes.
NOTE: You have used a O(N^3) approach to solve this problem. This problem can also be solved in O(N^2) using two-pointer technique.

1 Like