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)
Updated on: 2019-08-27T13:51:07+05:30

2K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements