Two Pointer Approach - Pair Sum

check my code please why it isn’t working??

error is:-Segmentation fault

ques:- https://online.codingblocks.com/app/player/189104/content/180082/6862/lecture

code:- https://ide.codingblocks.com/s/445894

hello @dasvishal60

check now->

it was not working becuase u were intialsing e with n-1 , without reading n.

also array size was not sufficient , it can be upto 1000 but u have declared a 100 size array

1 Like

thanks its working now

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.