Segmentation fault, core dumped

I’m puzzled which array usage was not proper. Kindly help out. The logic is intact.

hello @neelkanthpoosa

check now

Still the answer isn’t right. I’m trying to debug where it went wrong, but unable to find.

Never mind, got it. Thank you.

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.