Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JavaScript Algorithms and Data Structures 源码分析(12) -- AVL 树 avl-tree | 会飞的菜虫 #5

Open
FlyingCaiChong opened this issue Dec 14, 2023 · 0 comments

Comments

@FlyingCaiChong
Copy link
Owner

http://flyingcc.cn/2023/12/14/data-structures-012-AvlTree/

AVL 树在计算机科学中,AVL 树(以发明者 Adelson-Velsky 和 Landis 命名)是一种自平衡的二叉搜索树。它是第一个被发明出来的这种数据结构。在 AVL 树中,任何节点的两个子树的高度最多相差一;如果在任何时候它们相差超过一,就会进行重新平衡以恢复这个属性。查找、插入和删除在平均和最坏情况下都需要 O(log n)的时间,其中 n 是操作之前树中节点的数量。插入和删除可能需要

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant