Segmentation Fault

@ambuj_0909 your create_from_pre_in function is incorrect have a look at it. try to dry run the function for the given input and you’ll see your mistake.

Thanks I have edited the code but still I am failing 3 testcases, can you look into it.
Refer for code: -

@ambuj_0909 you are calculating the total number of nodes in the tree but you also have to check if that subtree is a binary search tree or not. report the number of the nodes in the biggest subtree that is also a BST.

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.