Problem 450 · Medium

Delete Node in a BST

Delete a key from a binary search tree and return the updated root while keeping the ordering valid. The visual searches down to the key, then replaces the removed node with its child or with its inorder successor.

Open the interactive visualisation