package leetcode;

/**
 * https://leetcode.com/problems/shuffle-string/
 */
public class Problem1528 {
    public String restoreString(String s, int[] indices) {
        // TODO
        return null;
    }

    public static void main(String[] args) {
        Problem1528 prob = new Problem1528();
        System.out.println(prob.restoreString("codeleet", new int[]{4,5,6,7,0,2,1,3})); // "leetcode"
        System.out.println(prob.restoreString("abc", new int[]{0,1,2})); // "abc"
        System.out.println(prob.restoreString("aiohn", new int[]{3,1,4,2,0})); // "nihao"
        System.out.println(prob.restoreString("aaiougrt", new int[]{4,0,2,6,7,3,1,53})); // "arigatou"
        System.out.println(prob.restoreString("art", new int[]{1,0,2})); // "rat"
    }
}

@@ -167,133 +167,44 @@
     
-// TODO%0A        return null;%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        Problem1528 prob = new Problem1528
+char%5B%5D answer = new char%5Bs.length
 ()
+%5D
 ;%0A  
@@ -213,458 +213,137 @@
     
-System.out.println(prob.restoreString(%22codeleet%22, new int%5B%5D%7B4,5,6,7,0,2,1,3%7D)); // %22leetcode%22%0A        System.out.println(prob.restoreString(%22abc%22, new int%5B%5D%7B0,1,2%7D)); // %22abc%22%0A        System.out.println(prob.restoreString(%22aiohn%22, new int%5B%5D%7B3,1,4,2,0%7D)); // %22nihao%22%0A        System.out.println(prob.restoreString(%22aaiougrt%22, new int%5B%5D%7B4,0,2,6,7,3,1,53%7D)); // %22arigatou%22%0A        System.out.println(prob.restoreString(%22art%22, new int%5B%5D%7B1,0,2%7D)); // %22rat%22
+for (int i = 0; i %3C s.length(); i++) %7B%0A            answer%5Bindices%5Bi%5D%5D = s.charAt(i);%0A        %7D%0A        return new String(answer);
 %0A   

Solve problem 1528