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 TreeAverage Case

InsertDeleteSearch
Binary Search TreeO(log n)O(log n)O(log n)
AVL treeO(log2 n)O(log2 n)O(log2 n)
B TreeO(log n)O(log n)O(log n)
Red-Black TreeO(log n)O(log n)O(log n)
Splay TreeO(log2 n)O(log2 n)O(log2 n)



Search TreeWorst Case

InsertDeleteSearch
Binary Search TreeO(n)O(n)O(n)
AVL treeO(log2 n)O(log2 n)O(log2 n)
B TreeO(log n)O(log n)O(log n)
Red-Black TreeO(log n)O(log n)O(log n)
Splay TreeO(log2 n)O(log2 n)O(log2 n)

Updated on: 27-Aug-2019

2K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements