← All problemsSign in

Rotate to Minimum

CodeChefRating 2637Open on judge ↗

There is a [slot machine](https://en.wikipedia.org/wiki/Slot_machine) with $N$ reels. Each reel has characters $a$ to $z$ **in order**. The initial configuration of the machine is given by a string $S$ of length $N$, i.e., initially, the $i^{th}$ reel from the left reads the character $S_i$. You can perform the following types of operations on the slot machine: - Type $1$: Pick a reel $i$ and

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