Binary Search Tree
A binary search tree keeps smaller keys in the left subtree and larger keys in the right. Search follows one path, so it tracks the height.
Costs
| Category | Data Structure |
| Difficulty | Medium |
| Search, insert, or delete | O(height) |
| Balanced height | O(log n) |
| Skewed height | O(n) |
Questions
What is Binary Search Tree?
A binary search tree keeps smaller keys in the left subtree and larger keys in the right. Search follows one path, so it tracks the height.
Where do I practice it?
DSA Master keeps challenges and progress on the phone. This page is the idea and the costs.