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.
Each second drop the first k letters and append any k letters; find the fewest seconds that can restore the word.