package leetcode;

/**
 * https://leetcode.com/problems/shifting-letters/
 */
public class Problem848 {
    public String shiftingLetters(String S, int[] shifts) {
        // TODO
        return null;
    }

    public static void main(String[] args) {
        Problem848 prob = new Problem848();
    }
}

@@ -169,132 +169,565 @@
     
-// TODO%0A        return null;%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        Problem848 prob = new Problem848();
+char%5B%5D chars = S.toCharArray();%0A        for (int i = 0; i %3C shifts.length; i++) %7B%0A            for (int j = 0; j %3C= i; j++) %7B%0A                int val = (chars%5Bj%5D - 'a' + shifts%5Bi%5D) %25 26;%0A                chars%5Bj%5D = (char) ('a' + val);%0A            %7D%0A        %7D%0A        return new String(chars);%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        Problem848 prob = new Problem848();%0A        System.out.println(prob.shiftingLetters(%22abc%22, new int%5B%5D%7B3, 5, 9%7D)); // rpl%0A        System.out.println(prob.shiftingLetters(%22bad%22, new int%5B%5D%7B10, 20, 30%7D)); // jyh
 %0A   

Update problem 848