AVL and Red black trees are both self-balancing except Red and black color in the nodes. What\'s the main reason for choosing Red black trees instead of AVL trees? What are the
Programmers generally don't like to dynamically allocate memory. The problem with the avl tree is that for "n" elements you need atleast log2(log2(n))...(height->log2(n)) bits to store the height of the tree! So when you are handling enormous data you cannot be sure of how many bits to allot for storing height at each node.
For instance if you use 4 bytes int (32 bits) for storing height. Maximum height can be : 2^32 and hence Maximum number of elements you can store in the tree is 2^(2^32) --(seems to be very big but in this age of data nothing is too big I guess). And hence if you over shoot this limit you have to dynamically allocate more space for storing height.
This is an answer suggested by a professor at my university which seemed reasonable to me! Hope I make sense.
Edits:The AVL trees are more balanced compared to Red Black Trees, but they may cause more rotations during insertion and deletion. So if your application involves many frequent insertions and deletions, then Red Black trees should be preferred. And if the insertions and deletions are less frequent and search is more frequent operation, then AVL tree should be preferred over Red Black Tree. --Source GEEKSFORGEEKS.ORG