Rotate String
Given a string and an offset, rotate string by offset. (rotate from left to right)
Example
Given"abcdefg"
.
分析
参见前题的手翻转例子,先局部再整体翻转,注意char[]处理后直接用。同时offset记得判断。
答案
Last updated
Given a string and an offset, rotate string by offset. (rotate from left to right)
Example
Given"abcdefg"
.
分析
参见前题的手翻转例子,先局部再整体翻转,注意char[]处理后直接用。同时offset记得判断。
答案
Last updated