定义:https://zh.wikipedia.org/wiki/平衡树
如何判断是否是BST:
An empty tree is height-balanced. A non-empty binary tree T is balanced if:
- Left subtree of T is balanced
- Right subtree of T is balanced
- The difference between heights of left subtree and right subtree is not more than 1.
树中的节点应当是排序过的。
如何构造平衡树:
博客介绍了平衡树的定义链接,阐述了判断是否为平衡二叉搜索树(BST)的条件,包括左右子树平衡且高度差不超1,树中节点需排序,还提及了如何构造平衡树。
970

被折叠的 条评论
为什么被折叠?



