Kth Smallest Element in a BST

Find the k-th smallest value in a BST.

Because an inorder traversal of a BST returns values in ascending order, the answer is the kth visited node in that traversal.

Examples
Input: [[3,1,4,null,2],1]
Output: 1
Hints
Related Problems

Kth Smallest Element in a BST

Find the k-th smallest value in a BST.