deleteinbst function not working it’s not deleting the node
Delete in bst recursion
Shubham, pls make the following changes in your code…
-
In the question, you are given the no of testcases, then you are given one array through which you will first build your tree using the native approach. Then you are given another array, which contains nodes that you need to delete from tree and then print the final result… But your code is not as per the input format. So pls change that.
-
I have made some changes in your code… You are only required to use these three functions only in your code …
node *deleteinbst(node *root, int key)
node *insertinbst(node *root, int data)
void printin(node *root)
Refer to this edited code…