-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
chufan
committed
Sep 13, 2023
1 parent
2b8a331
commit 1744848
Showing
21 changed files
with
207 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* function ListNode(x){ | ||
this.val = x; | ||
this.next = null; | ||
} */ | ||
|
||
|
||
/** | ||
* 【中等】链表中环的入口结点 | ||
* @param pHead | ||
* @constructor | ||
*/ | ||
function entryNodeOfLoop(pHead) { | ||
// write code here | ||
} | ||
module.exports = { | ||
entryNodeOfLoop | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* function ListNode(x){ | ||
this.val = x; | ||
this.next = null; | ||
} */ | ||
|
||
/** | ||
* 【简单】 两个链表的第一个公共结点 | ||
* @param pHead1 | ||
* @param pHead2 | ||
* @constructor | ||
*/ | ||
function findFirstCommonNode(pHead1, pHead2) { | ||
// write code here | ||
} | ||
module.exports = { | ||
findFirstCommonNode | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** | ||
* 【简单】判断链表中是否有环 | ||
* @param head ListNode类 | ||
* @return bool布尔型 | ||
*/ | ||
function hasCycle(head) { | ||
// write code here | ||
} | ||
module.exports = { | ||
hasCycle | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** | ||
* 【较难】合并k个已排序的链表 | ||
* @param lists ListNode类一维数组 | ||
* @return ListNode类 | ||
*/ | ||
function mergeKLists(lists) { | ||
|
||
} | ||
module.exports = { | ||
mergeKLists | ||
} |
Empty file.
Binary file added
BIN
+144 KB
docs/manuscripts/solo-algorithm/interview-101/images/entryNodeOfLoop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+153 KB
docs/manuscripts/solo-algorithm/interview-101/images/findFirstCommonNode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+104 KB
docs/manuscripts/solo-algorithm/interview-101/images/findKthToTail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+54.1 KB
docs/manuscripts/solo-algorithm/interview-101/images/removeNthFromEnd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+67.6 KB
docs/manuscripts/solo-algorithm/interview-101/images/reverseBetween.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
docs/manuscripts/solo-algorithm/interview-101/链表/entryNodeOfLoop.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# BM7 链表中环的入口结点 | ||
|
||
|
||
|
||
|
||
### 题目链接 | ||
|
||
- [牛客网](https://www.nowcoder.com/share/jump/8484115461694593953358) | ||
- [欢迎讨论]() | ||
|
||
### 题目描述 | ||
|
||
![反转链表.png](../images/entryNodeOfLoop.png) | ||
|
||
|
||
|
||
### 思路 | ||
|
||
### 代码实现 | ||
|
||
@[code js](@code/algorithm/interview-101/entryNodeOfLoop.js) | ||
|
||
|
||
### 一些建议 |
24 changes: 24 additions & 0 deletions
24
docs/manuscripts/solo-algorithm/interview-101/链表/findFirstCommonNode.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# BM8 链表中倒数最后k个结点 | ||
|
||
|
||
|
||
|
||
### 题目链接 | ||
|
||
- [牛客网](https://www.nowcoder.com/share/jump/8484115461694594781904) | ||
- [欢迎讨论]() | ||
|
||
### 题目描述 | ||
|
||
![反转链表.png](../images/findFirstCommonNode.png) | ||
|
||
|
||
|
||
### 思路 | ||
|
||
### 代码实现 | ||
|
||
@[code js](@code/algorithm/interview-101/findFirstCommonNode.js) | ||
|
||
|
||
### 一些建议 |
24 changes: 24 additions & 0 deletions
24
docs/manuscripts/solo-algorithm/interview-101/链表/findKthToTail.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# BM8 链表中倒数最后k个结点 | ||
|
||
|
||
|
||
|
||
### 题目链接 | ||
|
||
- [牛客网](https://www.nowcoder.com/share/jump/8484115461694594062276) | ||
- [欢迎讨论]() | ||
|
||
### 题目描述 | ||
|
||
![反转链表.png](../images/findKthToTail.png) | ||
|
||
|
||
|
||
### 思路 | ||
|
||
### 代码实现 | ||
|
||
@[code js](@code/algorithm/interview-101/findKthToTail.js) | ||
|
||
|
||
### 一些建议 |
24 changes: 24 additions & 0 deletions
24
docs/manuscripts/solo-algorithm/interview-101/链表/hasCycle.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# BM6 判断链表中是否有环 | ||
|
||
|
||
|
||
|
||
### 题目链接 | ||
|
||
- [牛客网](https://www.nowcoder.com/share/jump/8484115461694589556195) | ||
- [欢迎讨论]() | ||
|
||
### 题目描述 | ||
|
||
![反转链表.png](../images/hasCycle.png) | ||
|
||
|
||
|
||
### 思路 | ||
|
||
### 代码实现 | ||
|
||
@[code js](@code/algorithm/interview-101/hasCycle.js) | ||
|
||
|
||
### 一些建议 |
24 changes: 24 additions & 0 deletions
24
docs/manuscripts/solo-algorithm/interview-101/链表/mergeKLists.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# BM5 合并k个已排序的链表 | ||
|
||
|
||
|
||
|
||
### 题目链接 | ||
|
||
- [牛客网](https://www.nowcoder.com/share/jump/8484115461694589240005) | ||
- [欢迎讨论]() | ||
|
||
### 题目描述 | ||
|
||
![反转链表.png](../images/mergeLists.png) | ||
|
||
|
||
|
||
### 思路 | ||
|
||
### 代码实现 | ||
|
||
@[code js](@code/algorithm/interview-101/mergeLists.js) | ||
|
||
|
||
### 一些建议 |
24 changes: 24 additions & 0 deletions
24
docs/manuscripts/solo-algorithm/interview-101/链表/removeNthFromEnd.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
|
||
|
||
# BM9 删除链表的倒数第n个节点 | ||
|
||
|
||
### 题目链接 | ||
|
||
- [牛客网](https://www.nowcoder.com/share/jump/8484115461694594387319) | ||
- [欢迎讨论]() | ||
|
||
### 题目描述 | ||
|
||
![区间反转.png](../images/removeNthFromEnd.png) | ||
|
||
|
||
|
||
### 思路 | ||
|
||
### 代码实现 | ||
|
||
@[code js](@code/algorithm/interview-101/removeNthFromEnd.js) | ||
|
||
|
||
### 一些建议 |