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

View File

@@ -52,18 +52,18 @@ TreeNode *arrToTree(const int *arr, size_t size) {
TreeNode *root, *node;
TreeNode **queue;
/* 根点 */
/* 根点 */
root = newTreeNode(arr[0]);
/* 辅助队列 */
queue = (TreeNode **) malloc(sizeof(TreeNode) * MAX_NODE_SIZE);
// 队列指针
front = 0, rear = 0;
// 将根点放入队尾
// 将根点放入队尾
queue[rear++] = root;
// 记录遍历数组的索引
index = 0;
while (front < rear) {
// 取队列中的头点,并让头点出队
// 取队列中的头点,并让头点出队
node = queue[front++];
index++;
if (index < size) {
@@ -103,14 +103,14 @@ int *treeToArr(TreeNode *root) {
queue = (TreeNode **) malloc(sizeof(TreeNode) * MAX_NODE_SIZE);
// 队列指针
front = 0, rear = 0;
// 将根点放入队尾
// 将根点放入队尾
queue[rear++] = root;
/* 辅助数组 */
arr = (int *) malloc(sizeof(int) * MAX_NODE_SIZE);
// 数组指针
index = 0;
while (front < rear) {
// 取队列中的头点,并让头点出队
// 取队列中的头点,并让头点出队
node = queue[front++];
if (node != NULL) {
arr[index] = node->val;