public class Solution {
    public String LeftRotateString(String str,int n) {
        int L = str.length();
        char[] arr = new char[L];

        for(int i = 0; i < L; ++i){
            arr[(i + L - n)%L] = str.charAt(i);
        }

        return new String(arr);
    }
}