当前位置:网站首页>Sword finger offer 58 - ii Rotate string left

Sword finger offer 58 - ii Rotate string left

2022-07-05 05:29:00 ThE wAlkIng D

Title Description

 Insert picture description here

Problem analysis

Main investigation substring Usage of .

Code instance

class Solution {
    
    public String reverseLeftWords(String s, int n) {
    
        int len = s.length();
        return s.substring(n,len) + s.substring(0, n);
    }
}
原网站

版权声明
本文为[ThE wAlkIng D]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/186/202207050525449144.html