Can someone please share the code of target sum pair in arrays

My code is compiled successfully but not able to pass even a single test case.
Please resolve this problem ASAP.

hi @gyanendarsingh891_11faad0f77ec7480,
write i<n not i<=n while taking array input

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.