package leetcode;

/**
 * https://leetcode.com/problems/decrypt-string-from-alphabet-to-integer-mapping/
 */
public class Problem5303 {
    public String freqAlphabets(String s) {
        // TODO
        return null;
    }

    public static void main(String[] args) {
        Problem5303 prob = new Problem5303();
        System.out.println(prob.freqAlphabets("10#11#12")); // "jkab"
        System.out.println(prob.freqAlphabets("1326#")); // "acz"
        System.out.println(prob.freqAlphabets("25#")); // "y"
        System.out.println(prob.freqAlphabets("12345678910#11#12#13#14#15#16#17#18#19#20#21#22#23#24#25#26#")); // "abcdefghijklmnopqrstuvwxyz"
    }
}

@@ -185,476 +185,485 @@
     
-// TODO%0A        return null
+String answer = %22%22;%0A        int i = 0
 ;%0A    
-%7D%0A%0A
     
-public static void main(String%5B%5D args) %7B%0A        Problem5303 prob = new Problem5303();%0A        System.out.println(prob.freqAlphabets(%2210#11#12%22)); // %22jkab%22%0A        System.out.println(prob.freqAlphabets(%221326#%22)); // %22acz%22%0A        System.out.println(prob.freqAlphabets(%2225#%22)); // %22y%22%0A        System.out.println(prob.freqAlphabets(%2212345678910#11#12#13#14#15#16#17#18#19#20#21#22#23#24#25#26#%22)); // %22abcdefghijklmnopqrstuvwxyz%22
+while (i %3C s.length()) %7B%0A            if (i + 2 %3C s.length() && s.charAt(i + 2) == '#') %7B%0A                answer += toChar(Integer.parseInt(s.substring(i, i + 2)));%0A                i += 3;%0A            %7D else %7B%0A                answer += toChar(Integer.parseInt(%22%22 + s.charAt(i)));%0A                i++;%0A            %7D%0A        %7D%0A        return answer;%0A    %7D%0A%0A    private static char toChar(int n) %7B%0A        return (char) (n + 'a' - 1);
 %0A   

Solve problem 5303