trees

Comparison to other structures

♀尐吖头ヾ 提交于 2020-05-04 02:57:56
Both are self-balancing binary search trees, so they are very similar mathematically. The operations to balance the trees are different, but both occur in constant time. The real difference between the two is the limiting height. For a tree of size n : An AVL tree's height is strictly less than: [4] A red-black tree's height is at most 2log 2 ( n + 1) [5] The AVL tree is more rigidly balanced than Red-Black trees , leading to slower insertion and removal but faster retrieval. 来源: oschina 链接: https://my.oschina.net/u/135650/blog/16793