I am getting correct output ... but test cases are not passing

https://ide.codingblocks.com/s/226195… plz help with this code

hello @dhirenkinha
in delete in bst function.
you are not including the case when key > root - > data.

https://ide.codingblocks.com/s/226195… i updated my code … but still some cases are not passing

image
it should be
root=deleteInBst(root,s);

it worked … but what was happening before

you should update ur root node after performing deletion.
and u were missing the same in ur code.

1 Like