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

#103

Open
hunterhug opened this issue May 26, 2021 · 1 comment
Open

#103

hunterhug opened this issue May 26, 2021 · 1 comment

Comments

@hunterhug
Copy link
Owner

https://hunterhug.github.io/goa.c/#/algorithm/tree

Description

@1113464192
Copy link

大佬,你这个章节的数学公式可能写错了,如下内容:
一、二叉树的数学特征
高度为 h≥0 的二叉树至少有 h+1 个结点,比如最不平衡的二叉树就是退化的线性链表结构,所有的节点都只有左儿子节点,或者所有的节点都只有右儿子节点。
高度为 h≥0 的二叉树至多有 2^h+1 个节点,比如这棵树是满二叉树。
含有 n≥1 个结点的二叉树的高度至多为 n-1,由 1 退化的线性链表可以反推。
含有 n≥1 个结点的二叉树的高度至少为 logn,由 2 满二叉树可以反推。
在二叉树的第 i 层,至多有 2^(i-1) 个节点,比如该层是满的。

在第二点的节点公式应该是2^(h+1) - 1

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

2 participants