Advantage of Binary Search Tree:
- complexity of insert(), delete(), lookup() is O(logN)
- Increasing and decreasing order traversal is easy
- BST can be looked as a sorted array, so nth smallest element
and nth largest elements kind of statistics can be implemented
Disadvantages of BST:
- If it is not balanced, complexity becomes linear, not
logarithmic
Advantage of AVL
- As we know, BST gives O(N) complexity for a large number of
inputs. But this not the case with AVL. AVL is balanced and
efficient, so complexity remains o(Logn) for a large number of
input data.
Disadvantage of AVL
- Implementation of AVL is complicated
- Deletion operation is costly as it takes lots of rotation and
pointers
Advantages of Red-Black Tree;
- Insertion and deletion operation is very efficient
- They are self-balancing like AVL so complexity is O(logn) even
for large number of input
Disadvantages of Red-Black Tree
- complicated implementation