[Solved] Shifting Letters II LeetCode Contest
![[Solved] Shifting Letters II LeetCode Contest [Solved] Shifting Letters II LeetCode Contest](https://realcoder.techss24.com/wp-content/uploads/2022/08/Solved-Shifting-Letters-II-LeetCode-Contest.png)
You are given a string s of lowercase English letters and a 2D integer array shifts where shifts[i] = [starti, endi, directioni]. For every i, shift the characters in s from the index starti to the index endi (inclusive) forward if directioni = 1, or shift the characters backward if directioni = 0. Shifting a character forward means replacing it…