Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在为 AVL 树做演示,不明白什么是平衡因子。请给我链接或任何我能以图形方式理解的 AVL 树的高度效应的高度
如果我正确理解了你的问题。
左子树和右子树的高度差是AVL树的平衡因子。当因子为1,0或-1时,树平衡,否则不平衡。
玩AVL 树小程序以获得一些直觉
有关平衡因子,请参阅此链接