what is the error in this code
Delete nodes in bst
hello @shiniagarwal25
a) build a normal bst , by inserting array element one by one.
b) 
here it should be
root->left=deletebst(root->left,data);
c) 
it should be->


again u r doing same mistake in these lines.
it should
root->left=insert(root->left,d)
same for root->right=insert(root->right,d)
still not getting right answer
pls share ur updated code
hello @shiniagarwal25
u were reading same array elemnts twice. one while taking input in array and one while building tree.
check ur updated code here->
1 Like