Medium · Binary Search Trees · about 15 minutes
Asked at Amazon, Google, Uber, Meta.
Return the k-th smallest value stored in a binary search tree, counting from k = 1 for the minimum.
k
k = 1