230. Kth Smallest Element in a BST
problem description
Input: root = [3,1,4,null,2], k = 1
3
/ \
1 4
\
2
Output: 1Input: root = [5,3,6,2,4,null,null,1], k = 3
5
/ \
3 6
/ \
2 4
/
1
Output: 3algorithm thought
code
algorithm analysis
Last updated