Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit98f419f

Browse files
committed
update: README
1 parentef80af0 commit98f419f

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

‎README.md

Lines changed: 1 addition & 1 deletion
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

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

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ class ListNode {
1111
}
1212
}
1313

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

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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp