Skip to content

Commit 03e1b47

Browse files
committed
update problem source
1 parent d60bd3f commit 03e1b47

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

zh-cn/string/rotate_string.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,26 @@
44

55
- lintcode: [(8) Rotate String](http://www.lintcode.com/en/problem/rotate-string/)
66

7-
```
8-
Given a string and an offset, rotate string by offset. (rotate from left to right)
7+
### Problem
98

10-
Example
11-
Given "abcdefg"
9+
Given a string and an offset, rotate string by offset. (rotate from left to
10+
right)
1211

13-
for offset=0, return "abcdefg"
12+
#### Example
1413

15-
for offset=1, return "gabcdef"
14+
Given `"abcdefg"`.
1615

17-
for offset=2, return "fgabcde"
1816

19-
for offset=3, return "efgabcd"
2017

21-
...
22-
```
18+
offset=0 => "abcdefg"
19+
offset=1 => "gabcdef"
20+
offset=2 => "fgabcde"
21+
offset=3 => "efgabcd"
22+
23+
24+
#### Challenge
25+
26+
Rotate in-place with O(1) extra memory.
2327

2428
## 题解
2529

0 commit comments

Comments
 (0)