
[LeetCode] 2381. Shifting Letters II (Python)
·
알고리즘/LeetCode
난이도: Medium 문제 설명 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 with the next letter in the alph..