1
 2
 3
 4
 5
 6
 7
 8
 9
10
// @Title: 左旋转字符串 (左旋转字符串 LCOF)
// @Author: 15816537946@163.com
// @Date: 2022-02-02 21:38:27
// @Runtime: 0 ms
// @Memory: 2.2 MB
impl Solution {
    pub fn reverse_left_words(s: String, n: i32) -> String {
        [&s[n as usize..], &s[..n as usize]].concat()
    }
}