# Comparison of Search Trees in Data Structure

Data Structure AlgorithmsAnalysis of AlgorithmsAlgorithms

#### Big Data Hadoop

Best Seller

89 Lectures 11.5 hours

#### Practical Data Science using Python

22 Lectures 6 hours

#### Data Science and Data Analysis with Python

50 Lectures 3.5 hours

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)