arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2406.05162cs.DS
收藏

AVL树与红黑树三种变体的性能比较

Comparative Performance of the AVL Tree and Three Variants of the Red-Black Tree

Russell A. Brown

AI总结:

本文比较AVL树与三种红黑树变体在随机及连续有序键下的插入删除性能,并分析减少重平衡操作的替代删除算法。

摘要:

本文比较了AVL树与自底向上、自顶向下和左倾红黑树的性能。对于随机有序键的插入和删除,自底向上红黑树比AVL树更快。对于连续有序键,AVL树在插入时比自底向上红黑树快,但在删除时更慢。自顶向下红黑树在插入随机有序键时比自底向上红黑树快,但在删除随机有序键时更慢,且在插入和删除连续有序键时均更慢。左倾红黑树在插入和删除随机及连续有序键时均比其他三种树慢。本文还分析了一种替代删除算法,该算法减少了删除所需的重平衡操作次数。

英文摘要:

This article compares the performance of the AVL tree to the performance of the bottom-up, top-down, and left-leaning red-black trees. The bottom-up red-black tree is faster than the AVL tree for insertion and deletion of randomly ordered keys. The AVL tree is faster than the bottom-up red-black tree for insertion but slower for deletion of consecutively ordered keys. The top-down red-black tree is faster than the bottom-up red-black tree for insertion but slower for deletion of randomly ordered keys, and slower for insertion and deletion of consecutively ordered keys. The left-leaning red-black tree is slower than the three other trees for insertion and deletion of randomly and consecutively ordered keys. An alternative deletion algorithm, which reduces the number of rebalancing operations required by deletion, is analyzed.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑