<commit_before>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();
    }
}<commit_msg>Update problem 848<commit_after>package leetcode;

/**
 * https://leetcode.com/problems/shifting-letters/
 */
public class Problem848 {
    public String shiftingLetters(String S, int[] shifts) {
        char[] chars = S.toCharArray();
        for (int i = 0; i < shifts.length; i++) {
            for (int j = 0; j <= i; j++) {
                int val = (chars[j] - 'a' + shifts[i]) % 26;
                chars[j] = (char) ('a' + val);
            }
        }
        return new String(chars);
    }

    public static void main(String[] args) {
        Problem848 prob = new Problem848();
        System.out.println(prob.shiftingLetters("abc", new int[]{3, 5, 9})); // rpl
        System.out.println(prob.shiftingLetters("bad", new int[]{10, 20, 30})); // jyh
    }
}
{'fraction_non_alphanumeric': 0.15545454545454546, 'fraction_numerical': 0.03090909090909091, 'mean_word_length': 2.2865671641791043, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6598655', 'n_tokens_mistral': 383, 'n_tokens_neox': 352, 'n_words': 89}