Question

Given theĀ rootĀ of a binary search tree, and an integerĀ k, returnĀ theĀ kthĀ smallest value (1-indexed) of all the values of the nodes in the tree.

This is a tree question.

Idea(s)

Solution