Remove Then Add Back
Start from this binary search tree:
8
/ \
4 12
/ \ / \
2 6 10 14
Remove 8. Since it has two children, the implementation promotes its inorder successor into the vacated node and deletes that successor from the right subtree. Then add 8 back with the ordinary insert.
Where does 8 end up?
Sign in to answer questions and track your progress
Sign In