Binary Search Tree
8 problems · 8 with full explanations
3 Easy4 Medium0 Hard
A BST maintains the invariant: left subtree values < node < right subtree values. This gives O(h) search/insert/delete; O(log n) for balanced trees. In-order traversal yields sorted output. Use range checks ([min, max]) to validate BST property and find floor/ceiling.
How to practice
To practice Binary Search Tree problems effectively, start with the Easy problems listed below, trace through each solution on paper, then re-implement without looking. When you can recognise the binary search tree pattern within 30 seconds of reading a new problem, move on to Medium difficulty. Use the related topic pages and our study guide for a structured progression.
Start here (Easy + explained)
All Binary Search Tree problems
- 99.Recover Binary Search TreeMedium
- 108.Convert Sorted Array to Binary Search TreeEasy
- 230.Kth Smallest Element in a BSTMedium
- 700.Search in a Binary Search TreeEasy
- 703.Kth Largest Element in a StreamEasy
- 1038.Binary Search Tree to Greater Sum TreeMedium
- 1305.All Elements in Two Binary Search TreesUnknown
- 1382.Balance a Binary Search TreeMedium