← All problemsSign in

Rotate String

You are given a String $S$ of length $N$ consisting of only $0$ and $1$. There are $K$ no of queries where each query consists of one character $'L'$ or $'R '$ and one integer $P$. Your task is to rotate the String in left (for input L) or in right (for input R) direction for $P$ times and form a new string by taking the last character of the rotated String after the end of the rotation of each qu

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start