The perfect place for easy learning...

Data Structures

×

Topics List

Place your ad here

Comparison of Search Trees

The comparison of search trees is performed based on the Time complexity of search, insertion and deletion operations in search trees. The following table provides the Time complexities of search trees. These Time complexities are defined for 'n' number of elements.


Search Tree Average Case Worst Case
Insert Delete Search Insert Delete Search
Binary Search Tree O(log n) O(log n) O(log n) O(n) O(n) O(n)
AVL Tree O(log2 n) O(log2 n) O(log2 n) O(log2 n) O(log2 n) O(log2 n)
B - Tree O(log n) O(log n) O(log n) O(log n) O(log n) O(log n)
Red - Black Tree O(log n) O(log n) O(log n) O(log n) O(log n) O(log n)
Splay Tree O(log2 n) O(log2 n) O(log2 n) O(log2 n) O(log2 n) O(log2 n)

Place your ad here
Place your ad here