This commit is contained in:
krahets
2024-04-02 19:00:01 +08:00
parent bd0535ab5a
commit 20f79f5f32
19 changed files with 13343 additions and 2 deletions

View File

@ -492,7 +492,7 @@ comments: true
// 当左右子数组都还有元素时,进行比较并将较小的元素复制到临时数组中
while i <= mid && j <= right {
if nums[i] <= nums[j] {
tmp[k] = nums[j];
tmp[k] = nums[i];
i += 1;
} else {
tmp[k] = nums[j];

View File

@ -18,7 +18,7 @@ comments: true
<p align="center"> 图 7-12 &nbsp; 完美二叉树的数组表示 </p>
**映射公式的角色相当于链表中的引用**。给定数组中的任意一个节点,我们都可以通过映射公式来访问它的左(右)子节点。
**映射公式的角色相当于链表中的节点引用(指针)**。给定数组中的任意一个节点,我们都可以通过映射公式来访问它的左(右)子节点。
## 7.3.2 &nbsp; 表示任意二叉树