Search
⌘K

Leetcode 1427. Perform String Shifts

Given a string and a list of shift operations (each a direction and amount), compute the final string after applying all shifts; the key is to combine shifts into a single net left/right rotation and apply it modulo the string length to avoid repeated moves.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.