Problem 230 · Medium

Kth Smallest Element in a BST

In-order traversal of BST yields sorted order; stop at the k-th visited node.

Open the interactive visualisation