The code isnt working

the code shows segmentation fault . please look into it.

Hey @somilgupta4
Your code is working absolutely fine.
The current input you are using to make tree is incomplete.
Here use this 3 4 -1 6 -1 -1 5 1 -1 -1 -1
I just appended another -1 to the end to make it a valid input.
Let me know if issue is not resolved :slight_smile:

Hey ,If your doubt is resolved then please mark it resolved :slight_smile:
Otherwise let me know the issue .

1 Like

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.

1 Like