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 operations like search, insertion and deletion in search trees. The following table provides the Time complexities of search trees. These Time complexity is 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