Target sum Array

Please let me know why is the teat case failing

hi @samyakjain1050_65748654e19948da
u have to print smaller element first, then larger element like this-

cout<<min(a[i], a[j])<<" and "<<max(a[i], a[j])<<endl;

corrected code -->


It’s passing all test cases…

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.