Whats going wrong in my code??
BST deletion problem
hi @sounakume
your code is corect
but there is one small error
if you make newRoot (newR) then you have to pass it donβt use previous root
instead of that better way is to use only root in this fashion
for (int i = 0; i < m; i++)
{
root = deleteNodeGiven(root, arr[i]);
}
// BFS(root);
preOrder(root);
thank you , i got it
1 Like