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] main from itcharge:main #23

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 13 commits into AlgorithmAndLeetCode:main from itcharge:main
Aug 9, 2022
Merged
Changes from 1 commit
Commits
Show all changes
13 commits
Select commit Hold shift + click to select a range
60d8274
Update 0771. 宝石与石头.md
itcharge Aug 8, 2022
006157d
Update 2235. 两整数相加.md
itcharge Aug 8, 2022
ea71e33
Update 1929. 数组串联.md
itcharge Aug 8, 2022
774639b
Update 1480. 一维数组的动态和.md
itcharge Aug 9, 2022
07af991
Create 0709. 转换成小写字母.md
itcharge Aug 9, 2022
3c66bb9
Create 1672. 最富有客户的资产总量.md
itcharge Aug 9, 2022
cf383a0
Update 0066. 加一.md
itcharge Aug 9, 2022
9a7f2dc
Update 0189. 轮转数组.md
itcharge Aug 9, 2022
26b605f
Update 0048. 旋转图像.md
itcharge Aug 9, 2022
efdb7d2
Update 0724. 寻找数组的中心下标.md
itcharge Aug 9, 2022
bb00113
Update 0054. 螺旋矩阵.md
itcharge Aug 9, 2022
75279ea
Update 0498. 对角线遍历.md
itcharge Aug 9, 2022
7aacbc3
更新「Leetcode 刷题课程第一期」内容
itcharge Aug 9, 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
Prev Previous commit
Next Next commit
Update 0189. 轮转数组.md
  • Loading branch information
itcharge committed Aug 9, 2022
commit 9a7f2dce02f84b45fd6b2204e3a3f5f4ba9e5785
6 changes: 5 additions & 1 deletion Solutions/0189. 轮转数组.md
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

## 解题思路

### 思路 1:
### 思路 1: 数组翻转

可以用一个新数组,先保存原数组的后 `k` 个元素,再保存原数组的前 `n - k` 个元素。但题目要求不使用额外的数组空间,那么就需要在原数组上做操作。

Expand Down Expand Up @@ -60,3 +60,7 @@ class Solution:
right -= 1https://lestore.lenovo.com/detail/25113
```

### 思路 1:复杂度分析

- **时间复杂度**:$O(n)$。翻转的时间复杂度为 $O(n)$ 。
- **空间复杂度**:$O(1)$。

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