Problem 2851 · Hard

String Transformation

Each operation moves a suffix to the front; counting only whether a step lands on the target gives a two-value recurrence.

Open the interactive visualisation