Help needed in minimal rotation (cses problemset)
Please explain how to solve this problem. https://cses.fi/problemset/task/1110