We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d60bd3f commit 03e1b47Copy full SHA for 03e1b47
zh-cn/string/rotate_string.md
@@ -4,22 +4,26 @@
4
5
- lintcode: [(8) Rotate String](http://www.lintcode.com/en/problem/rotate-string/)
6
7
-```
8
-Given a string and an offset, rotate string by offset. (rotate from left to right)
+### Problem
9
10
-Example
11
-Given "abcdefg"
+Given a string and an offset, rotate string by offset. (rotate from left to
+right)
12
13
-for offset=0, return "abcdefg"
+#### Example
14
15
-for offset=1, return "gabcdef"
+Given `"abcdefg"`.
16
17
-for offset=2, return "fgabcde"
18
19
-for offset=3, return "efgabcd"
20
21
-...
22
+ offset=0 => "abcdefg"
+ offset=1 => "gabcdef"
+ offset=2 => "fgabcde"
+ offset=3 => "efgabcd"
+
23
24
+#### Challenge
25
26
+Rotate in-place with O(1) extra memory.
27
28
## 题解
29
0 commit comments