Skip to content

Commit a627091

Browse files
authored
docs: 读书整理模块 文档更新
2 parents c744d1d + ee71d44 commit a627091

File tree

111 files changed

+798
-376
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+798
-376
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
* function ListNode(x){
3+
* this.val = x;
4+
* this.next = null;
5+
* }
6+
*/
7+
/**
8+
*
9+
* @param head1 ListNode类
10+
* @param head2 ListNode类
11+
* @return ListNode类
12+
*/
13+
function addInList(head1, head2) {
14+
// write code here
15+
}
16+
module.exports = {
17+
addInList
18+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* function ListNode(x){
3+
* this.val = x;
4+
* this.next = null;
5+
* }
6+
*/
7+
/**
8+
*
9+
* @param head ListNode类
10+
* @return ListNode类
11+
*/
12+
function deleteDuplicatesOne(head) {
13+
// write code here
14+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* function ListNode(x){
3+
* this.val = x;
4+
* this.next = null;
5+
* }
6+
*/
7+
/**
8+
*
9+
* @param head ListNode类
10+
* @return ListNode类
11+
*/
12+
function deleteDuplicatesTwo(head) {
13+
// write code here
14+
}
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+
}

code/algorithm/interview-101/fibonacci.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ function fibonacciOne(n) {
1111
/**
1212
* 斐波那契数列,迭代
1313
* 难度:入门
14-
* @param n
1514
*/
1615
function fibonacciTwo(n) {
1716
// 数列初始化
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: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*
2+
* function ListNode(x){
3+
* this.val = x;
4+
* this.next = null;
5+
* }
6+
*/
7+
/**
8+
*
9+
* @param head ListNode类 the head
10+
* @return bool布尔型
11+
*/
12+
function isPail(head) {
13+
// write code here
14+
}
15+
module.exports = {
16+
isPail
17+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* @param pHead1 ListNode类
3+
* @param pHead2 ListNode类
4+
* @return ListNode类
5+
*/
6+
function merge(pHead1, pHead2) {
7+
// write code here
8+
}
9+
module.exports = {
10+
merge
11+
}

0 commit comments

Comments
 (0)