Bug fixes and improvements (#1735)

* Fix the definition of "complete binary tree" in binary_tree.md

* Update en/README.md
This commit is contained in:
Yudong Jin
2025-04-15 16:57:31 +08:00
committed by GitHub
parent 8e38c61455
commit d976116292
4 changed files with 5 additions and 5 deletions

View File

@ -655,7 +655,7 @@
### 完全二叉树
如下图所示,<u>完全二叉树complete binary tree</u>只有最底层的节点未被填满,且最底层节点尽量靠左填充。请注意,完美二叉树也是一棵完全二叉树。
如下图所示,<u>完全二叉树complete binary tree</u>仅允许最底层的节点不完全填满,且最底层节点必须从左至右依次连续填充。请注意,完美二叉树也是一棵完全二叉树。
![完全二叉树](binary_tree.assets/complete_binary_tree.png)

View File

@ -4,7 +4,7 @@
</p>
<p align="center">
<img style="height: 60px;" src="https://readme-typing-svg.demolab.com?font=Noto+Sans+SC&weight=500&duration=3500&pause=2000&color=21C8B8&center=true&vCenter=true&random=false&width=200&lines=Hello%2C+Algo+!" alt="hello-algo-typing-svg" />
<img style="height: 60px;" src="https://readme-typing-svg.demolab.com?font=Roboto&weight=400&duration=3500&pause=2000&color=21C8B8&center=true&vCenter=true&random=false&width=200&lines=Hello%2C+Algo+!" alt="hello-algo-typing-svg" />
</br>
Data structures and algorithms crash course with animated illustrations and off-the-shelf code
</p>

View File

@ -106,7 +106,7 @@ A <u>binary tree</u> is a non-linear data structure that represents the hierarch
val: number;
left: TreeNode | null;
right: TreeNode | null;
constructor(val?: number, left?: TreeNode | null, right?: TreeNode | null) {
this.val = val === undefined ? 0 : val; // Node value
this.left = left === undefined ? null : left; // Reference to left child node
@ -625,7 +625,7 @@ As shown in the figure below, in a <u>perfect binary tree</u>, all levels are co
### Complete binary tree
As shown in the figure below, a <u>complete binary tree</u> is a binary tree where only the nodes in the bottom level are not completely filled, and the nodes in the bottom level are filled from left to right as much as possible. Please note that a perfect binary tree is also a complete binary tree.
As shown in the figure below, a <u>complete binary tree</u> is a binary tree where only the bottom level is possibly not completely filled, and nodes at the bottom level must be filled continuously from left to right. Note that a perfect binary tree is also a complete binary tree.
![Complete binary tree](binary_tree.assets/complete_binary_tree.png)

View File

@ -655,7 +655,7 @@
### 完全二元樹
如下圖所示,<u>完全二元樹complete binary tree</u>只有最底層的節點未被填滿,且最底層節點儘量靠左填充。請注意,完美二元樹也是一棵完全二元樹。
如下圖所示,<u>完全二元樹complete binary tree</u>僅允許最底層的節點不完全填滿,且最底層節點必須從左至右依次連續填充。請注意,完美二元樹也是一棵完全二元樹。
![完全二元樹](binary_tree.assets/complete_binary_tree.png)