Delete a Node in a BST

Medium · Binary Search Trees · about 25 minutes

Asked at Microsoft, Amazon, Uber.

Take the node with value key out of a binary search tree, if there is one, keeping the BST ordering intact. Return the root of the updated tree.

Related guides