Target sum triplet


This is my solution. Why is it not able to pass all the test cases?

@tanyaa.sood
Because your were using ‘if’ and not ‘if else’ . I have corrected your code and attached the link.