Problem 510 · Medium

Inorder Successor in BST II

Find the inorder successor of a node in a binary search tree when every node has a parent link. The visual highlights the leftmost node of the right subtree, or climbs upward to the first ancestor reached from its left side.

Open the interactive visualisation