Solution Review: Delete Node
This review provides a detailed analysis of how to delete the x node from a binary search tree.
We'll cover the following...
We'll cover the following...
Solution
For this solution, there can be three cases for the node that needs to be deleted. Let’s call this node x
for simplicity. We’ll discuss each case one-by-one.
Case 1: node x
has no children
This is a trivial case, in which we just delete the node (by changing the parent node so that it does not point to x
...