refactor: Replace 结点 with 节点 (#452)

* Replace 结点 with 节点
Update the footnotes in the figures

* Update mindmap

* Reduce the size of the mindmap.png
This commit is contained in:
Yudong Jin
2023-04-09 04:32:17 +08:00
committed by GitHub
parent 3f4e32b2b0
commit 1c8b7ef559
395 changed files with 2056 additions and 2056 deletions
+5 -5
View File
@@ -18,7 +18,7 @@ int *levelOrder(TreeNode *root, int *size) {
queue = (TreeNode **) malloc(sizeof(TreeNode) * MAX_NODE_SIZE);
// 队列指针
front = 0, rear = 0;
// 加入根
// 加入根
queue[rear++] = root;
// 初始化一个列表,用于保存遍历序列
/* 辅助数组 */
@@ -28,14 +28,14 @@ int *levelOrder(TreeNode *root, int *size) {
while (front < rear) {
// 队列出队
node = queue[front++];
// 保存点值
// 保存点值
arr[index++] = node->val;
if (node->left != NULL) {
// 左子点入队
// 左子点入队
queue[rear++] = node->left;
}
if (node->right != NULL) {
// 右子点入队
// 右子点入队
queue[rear++] = node->right;
}
}
@@ -59,7 +59,7 @@ int main() {
/* 层序遍历 */
// 需要传入数组的长度
int *arr = levelOrder(root, &size);
printf("层序遍历的点打印序列 = ");
printf("层序遍历的点打印序列 = ");
printArray(arr, size);
return 0;