Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.

Commit d624a11

Browse files
aQuaaQua
aQua
authored and
aQua
committed
189 finish
1 parent 9a45a90 commit d624a11

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

Algorithms/0189.rotate-array/README.md

-3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,3 @@ Related problem: [Reverse Words in a String II](https://leetcode.com/problems/re
2121
1. nums 整体翻转
2222
1. nums[:k] 翻转
2323
1. nums[k:] 翻转
24-
25-
### 递归交换
26-
见程序注释

Algorithms/0189.rotate-array/rotate-array_test.go

+9
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ func Test_Problem0189(t *testing.T) {
2828

2929
qs := []question{
3030

31+
question{
32+
para{
33+
[]int{1, 2, 3, 4, 5, 6}, 2,
34+
},
35+
ans{
36+
[]int{5, 6, 1, 2, 3, 4},
37+
},
38+
},
39+
3140
question{
3241
para{
3342
[]int{1, 2, 3, 4, 5, 6, 7}, 14,

0 commit comments

Comments
 (0)