Problem 3735 · Medium
Reverse one prefix or one suffix of the string and keep the smallest result.
Open the interactive visualisation