Company: DocuSign_6april
Difficulty: medium
Get Shifted String Problem Description Two operations on a string are defined: Left Shift: a single circular rotation in which the first character moves to the end and every other character moves one position to the left. For example, abcde becomes bcdea after one left shift, and cdeab after two left shifts. Right Shift: a single circular rotation in which the last character moves to the beginning and every other character moves one position to the right. For example, abcde becomes eabcd after one right shift, and deabc after two right shifts. You are given a string s , a number of left shifts leftShifts , and a number of right shifts rightShifts . Apply all the left shifts to s first, then apply all the right shifts to the result, and report the string you end up with. Complete the function getShiftedString with the following parameters: string s : the string to shift int leftShifts : the number of left shifts to apply int rightShifts : the number of right shifts to apply Returns - st