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

[pull] master from youngyangyang04:master #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
pull merged 11 commits into AlgorithmAndLeetCode:master from youngyangyang04:master
Jul 8, 2022
Merged
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit Hold shift + click to select a range
3605046
Add JS correct reverse method
alexgy1 Jun 3, 2022
a2a2cf6
修改0106从中序与后序遍历序列构造二叉树 Java版本
Zolliner Jun 3, 2022
af1b3e3
添加(0209.长度最小的子数组.md):增加 C# 版本
Cwlrin Jun 3, 2022
648833e
Merge pull request #1 from Cwlrin/Cwlrin-patch-1
Cwlrin Jun 3, 2022
cccb497
添加(0035.搜索插入位置.md):增加typescript版本
xiaofei-2020 Jun 4, 2022
388d4f7
Merge branch 'youngyangyang04:master' into test01
Cwlrin Jun 4, 2022
dfcdb73
Merge branch 'youngyangyang04:master' into test01
Cwlrin Jun 6, 2022
5a31943
Merge pull request #1432 from alexgy1/master
youngyangyang04 Jul 8, 2022
b9bc1ec
Merge pull request #1433 from lizhendong128/master
youngyangyang04 Jul 8, 2022
fc165da
Merge pull request #1434 from Cwlrin/test01
youngyangyang04 Jul 8, 2022
cc10422
Merge pull request #1435 from xiaofei-2020/exArr09
youngyangyang04 Jul 8, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add JS correct reverse method
  • Loading branch information
alexgy1 authored Jun 3, 2022
commit 3605046879d02c5f6b931f7440935ef4142ef121
6 changes: 3 additions & 3 deletions problems/0344.反转字符串.md
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,13 @@ javaScript:
* @return {void} Do not return anything, modify s in-place instead.
*/
var reverseString = function(s) {
return s.reverse();
//Do not return anything, modify s in-place instead.
reverse(s)
};

var reverseString = function(s) {
var reverse = function(s) {
let l = -1, r = s.length;
while(++l < --r) [s[l], s[r]] = [s[r], s[l]];
return s;
};
```

Expand Down

AltStyle によって変換されたページ (->オリジナル) /