You are given a string s containing lowercase English letters and a shift where shift[i] = [direction_i, amount_i].
Each operation shifts the string s according to the following rules:
If direction_i s to the left by amount_i positions. A left shift of s to the end.
If direction_i s to the right by amount_i positions. A right shift of s to the beginning.
Return the resulting string after performing all shift operations on s in the given order.
Constraints:
s.length
s only contains lowercase English letters.
shift.length
shift[i].length
direction_i is either
amount_i
You are given a string s containing lowercase English letters and a shift where shift[i] = [direction_i, amount_i].
Each operation shifts the string s according to the following rules:
If direction_i s to the left by amount_i positions. A left shift of s to the end.
If direction_i s to the right by amount_i positions. A right shift of s to the beginning.
Return the resulting string after performing all shift operations on s in the given order.
Constraints:
s.length
s only contains lowercase English letters.
shift.length
shift[i].length
direction_i is either
amount_i