Oracle Interview Question

How to delete a node in a binary search tree,which had both left and right child?

Interview Answer

Anonymous

Aug 18, 2017

we need to find either leftmost node in right sub tree or rightmost node in left sub-tree,then copy its data to root node ,and then delete the node that we found in the beginning.