Company: PayPal SWE Intern_30oct
Difficulty: medium
Roll the String Problem Description A single roll operation increments each character by one in a circular manner within the English alphabet (a-z). For example, 'a' becomes 'b', 'b' becomes 'c', and 'z' becomes 'a'. Given a string s and an array of integers roll , perform a roll operation on the first roll[i] characters of s for each element i in the array. For instance, if s = 'abz' and roll = [3, 2, 1] : roll[0] = 3: Roll all three characters, 'abz' becomes 'bca' roll[1] = 2: Roll the first two characters, 'bca' becomes 'eda' roll[2] = 1: Roll the first character, 'eda' becomes 'dda' The final value of s is 'dda'. Complete the function rollTheString in the editor with the following parameter(s): string s : the string to operate on int roll[n] : the number of items in s to roll Returns: string : the resulting string after all roll operations have been performed Examples Example 1: Input: s = 'abz', roll = [3] Output: bca Explanation: Roll forward the first 3 characters in the substri