Examples
Input: root = [7,3,10,1,5,8,12], k = 2
Output: 3
Explanation: In this BST, the second smallest value is 3.
Input: root = [1,null,2,null,3,null,4,null,5], k = 4
Output: 4
Explanation: In this right-skewed BST, the fourth smallest value is 4.
Input: root = [8,6,10,5,7,9,12], k = 5
Output: 9
Explanation: In this BST, the fifth smallest value is 9.