mirror of
https://github.com/krahets/hello-algo.git
synced 2025-07-24 02:03:10 +08:00
build
This commit is contained in:
@ -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];
|
||||
|
@ -18,7 +18,7 @@ comments: true
|
||||
|
||||
<p align="center"> 图 7-12 完美二叉树的数组表示 </p>
|
||||
|
||||
**映射公式的角色相当于链表中的引用**。给定数组中的任意一个节点,我们都可以通过映射公式来访问它的左(右)子节点。
|
||||
**映射公式的角色相当于链表中的节点引用(指针)**。给定数组中的任意一个节点,我们都可以通过映射公式来访问它的左(右)子节点。
|
||||
|
||||
## 7.3.2 表示任意二叉树
|
||||
|
||||
|
Reference in New Issue
Block a user