Skip to content

Commit 98f419f

Browse files
committed
update: README
1 parent ef80af0 commit 98f419f

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

‎README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This is the solutions collection of my LeetCode submissions, most of them are pr
44

55
**ATTENTION**: If you also use JavaScript as your coding language, you should pay attention to some JavaScript INTERNAL issues, such as bitwise operators, so as to let you not drop into some trouble which may be caused by JavaScript itself.
66

7-
**Progress: 152 Solutions**
7+
**Progress: 156/2520 Solutions**
88

99
| ID | Title | Solution | Difficulty |
1010
|-----|-------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------|------------|

‎src/powx-n/res.ts

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/**
2+
* 迭代法或者递归法均可实现,本实现为递归法
3+
* @param x
4+
* @param n
5+
*/
16
function myPow(x: number, n: number): number {
27
if (n === 0) {
38
return 1;

‎src/swap-nodes-in-pairs/res.ts

+7
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ class ListNode {
1111
}
1212
}
1313

14+
/**
15+
* 迭代法或者递归法均可实现,本实现为迭代法
16+
*/
1417
function swapPairs(head: ListNode | null): ListNode | null {
1518
if (!head?.next) {
1619
return head;
@@ -39,6 +42,10 @@ function swapPairs(head: ListNode | null): ListNode | null {
3942
return result;
4043
};
4144

45+
/**
46+
* 递归法
47+
* @param head
48+
*/
4249
function swapPairs2(head: ListNode | null): ListNode | null {
4350
if (!head?.next) {
4451
return head;

0 commit comments

Comments
 (0)