Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 230. Kth Smallest Element in a BST
Return the k-th smallest value (1-indexed) in a BST — exploit that an in-order traversal yields values in sorted order and pick the k-th visited node. For frequent updates/queries, augment the BST with subtree sizes (an order-statistic tree) to support O(log n) queries and updates.
Asked at:
Amazon
Meta
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Early March, 2025
Meta
Senior
Early February, 2025
Junior
Mid January, 2025
Amazon
Senior
Find the kth smallest element in a BST
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.