左旋转字符串_JAVA_中等
左旋转字符串
http://www.nowcoder.com/questionTerminal/12d959b108cb42b1ab72cef4d36af5ec
一、substring解法
public class Solution { public String LeftRotateString(String str,int n) { if(str.length() == 0) { return str; } n %= str.length(); return str.substring(n, str.length()) + str.substring(0,n); } }