Binary Search Trees
← Back to Tree Structures
Binary tree where left subtree contains values less than the node and right subtree contains values greater. Enables efficient searching, but degrades to O(n) if unbalanced.
Key Properties
Complexity
| Operation | Average | Worst (unbalanced) |
|---|---|---|
| Search | O(log n) | O(n) |
| Insert | O(log n) | O(n) |
| Delete | O(log n) | O(n) |
Related
- Self-Balancing Trees (fix worst-case)
- Binary Trees (parent structure)