Kth smallest element in a BST

0
Remix

Given the root of a binary search tree and an integer k, return the k-th smallest value in it, ideally stopping the in-order walk as soon as you reach it.

UberTechnical phone screenLast asked Feb 2026
No answer yet. Write the first one; the best answer gets endorsed.