- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Comparison of Search Trees in Data Structure
Here we will see some search trees and their differences. There are many different search trees. They are different in nature. The basic search tree is Binary Search Tree (BST). Some other search trees are AVL tree, B tree, Red-Black tree, splay tree etc.
These trees can be compares based on their operations. We will see the time complexity of these trees
Search Tree | Average Case | ||
---|---|---|---|
Insert | Delete | Search | |
Binary Search Tree | O(log n) | O(log n) | O(log n) |
AVL tree | O(log2 n) | O(log2 n) | O(log2 n) |
B Tree | O(log n) | O(log n) | O(log n) |
Red-Black Tree | O(log n) | O(log n) | O(log n) |
Splay Tree | O(log2 n) | O(log2 n) | O(log2 n) |
Search Tree | Worst Case | ||
---|---|---|---|
Insert | Delete | Search | |
Binary Search Tree | O(n) | O(n) | O(n) |
AVL tree | O(log2 n) | O(log2 n) | O(log2 n) |
B Tree | O(log n) | O(log n) | O(log n) |
Red-Black Tree | O(log n) | O(log n) | O(log n) |
Splay Tree | O(log2 n) | O(log2 n) | O(log2 n) |
- Related Articles
- Dynamic Finger Search Trees in Data Structure
- Randomized Finger Search Trees in Data Structure
- Balanced binary search trees in Data Structure
- Range Trees in Data Structure
- BSP Trees in Data Structure
- Huffman Trees in Data Structure
- Splay trees in Data Structure
- Solid Trees in Data Structure
- R-trees in Data Structure
- Interval Trees in Data Structure
- Segment Trees in Data Structure
- Tournament Trees, Winner Trees and Loser Trees in Data Structure
- Optimality of Splay Trees in Data Structure
- Optimal Lopsided Trees in Data Structure
- Threaded Binary Trees in Data Structure

Advertisements