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

@@ -15,7 +15,7 @@ function hashingSearchArray(map, target) {
/* 哈希查找(链表) */
function hashingSearchLinkedList(map, target) {
// 哈希表的 key: 目标点值value: 点对象
// 哈希表的 key: 目标点值value: 点对象
// 若哈希表中无此 key ,返回 null
return map.has(target) ? map.get(target) : null;
}
@@ -38,8 +38,8 @@ let head = arrToLinkedList(nums)
// 初始化哈希表
const map1 = new Map();
while (head != null) {
map1.set(head.val, head); // key: 点值value:
map1.set(head.val, head); // key: 点值value:
head = head.next;
}
const node = hashingSearchLinkedList(map1, target);
console.log("目标点值 3 的对应点对象为", node);
console.log("目标点值 3 的对应点对象为", node);

View File

@@ -23,13 +23,13 @@ function linearSearchArray(nums, target) {
function linearSearchLinkedList(head, target) {
// 遍历链表
while(head) {
// 找到目标点,返回之
// 找到目标点,返回之
if(head.val === target) {
return head;
}
head = head.next;
}
// 未找到目标点,返回 null
// 未找到目标点,返回 null
return null;
}
@@ -44,4 +44,4 @@ console.log("目标元素 3 的索引 = " + index);
/* 在链表中执行线性查找 */
const head = arrToLinkedList(nums);
const node = linearSearchLinkedList(head, target);
console.log("目标点值 3 的对应点对象为 ", node);
console.log("目标点值 3 的对应点对象为 ", node);