Only few test cases passing

Could you please check what is wrong with my code.
code: https://onlinegdb.com/BMIGFLsHS

hi @adarsh.sulegai500
ur code is not compiling only… its giving segmentation fault… send me the updated link…
or u can refer this code --> https://ide.codingblocks.com/s/641930

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.

I do not understand the code you have sent. Could you please explain it?

which part don’t u understand… ur code is also quite similar to this…

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.