Skip to content

Commit 1744848

Browse files
author
chufan
committed
docs: 牛客算法文档更新
1 parent 2b8a331 commit 1744848

21 files changed

+207
-9
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/* function ListNode(x){
2+
this.val = x;
3+
this.next = null;
4+
} */
5+
6+
7+
/**
8+
* 【中等】链表中环的入口结点
9+
* @param pHead
10+
* @constructor
11+
*/
12+
function entryNodeOfLoop(pHead) {
13+
// write code here
14+
}
15+
module.exports = {
16+
entryNodeOfLoop
17+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/* function ListNode(x){
2+
this.val = x;
3+
this.next = null;
4+
} */
5+
6+
/**
7+
* 【简单】 两个链表的第一个公共结点
8+
* @param pHead1
9+
* @param pHead2
10+
* @constructor
11+
*/
12+
function findFirstCommonNode(pHead1, pHead2) {
13+
// write code here
14+
}
15+
module.exports = {
16+
findFirstCommonNode
17+
}

code/algorithm/interview-101/findKthToTail.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ function ListNode(x) {
88
this.next = null
99
}
1010
/**
11-
* 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可
12-
*
13-
*
11+
* 【简单】 链表中倒数最后k个结点
1412
* @param pHead ListNode类
1513
* @param k int整型
1614
* @return ListNode类
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* 【简单】判断链表中是否有环
3+
* @param head ListNode类
4+
* @return bool布尔型
5+
*/
6+
function hasCycle(head) {
7+
// write code here
8+
}
9+
module.exports = {
10+
hasCycle
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* 【较难】合并k个已排序的链表
3+
* @param lists ListNode类一维数组
4+
* @return ListNode类
5+
*/
6+
function mergeKLists(lists) {
7+
8+
}
9+
module.exports = {
10+
mergeKLists
11+
}

code/algorithm/interview-101/removeNthFromEnd.js

Whitespace-only changes.
144 KB
Loading
153 KB
Loading
104 KB
Loading
146 KB
Loading

0 commit comments

Comments
 (0)