[LeetCode] Total Characters in String After Transformations II

1 · · Oct. 27, 2024, 6:02 a.m.
3337. Total Characters in String After Transformations II You are given a string s consisting of lowercase English letters, an integer t representing the number of transformations to perform, and an array nums of size 26. In one transformation, every character in s is replaced according to the following rules: Replace s[i] with the next nums[s[i] - 'a'] consecutive characters in the alphabet. For example, if s[i] = 'a' and nums[0] = 3, the character 'a' transforms into the next 3 consecutive c...