Given the root of a BST and an integer k, return the kth smallest value (1-indexed).
Input: root=[3,1,4,null,2], k=1 Output: 1 Input: root=[5,3,6,2,4,null,null,1], k=3 Output: 3
Unlock hints progressively β start gentle, go deeper only if needed.
Level 1: Gentle Nudge
A subtle direction
Level 2: Approach
The algorithm to use
Level 3: Detailed
Step-by-step guidance
to save progress and use AI features