Problem 3029 · Medium

Minimum Time to Revert Word to Initial State I

Each second drop the first k letters and append any k letters; find the fewest seconds that can restore the word.

Open the interactive visualisation