Why My Code is Giving Segmentation Fault?

Here’s The Link of my code : https://ide.codingblocks.com/s/679239

Why is it not running and giving segmentation fault ?

hi @manchandagitansh4_b5d09b65db5085fd u r entering different no of nodes in preorder and inorder

I am unable to understand this no of nodes part can you show this on code or elaborate a little more

hi @manchandagitansh4_b5d09b65db5085fd u are giving diff no of nodes in inorder and preorder while giving input here, no of nodes cant vary in inorder and preorder
image

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.

Still giving segmentation fault after correcting the no. of nodes

hi @manchandagitansh4_b5d09b65db5085fd send the updated code

https://ide.codingblocks.com/s/679239 updated code

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.