Problems > Suffix Minima > Editorial

Suffix Minima — Solution & Editorial

Back to the Problem

Sweep from the right carrying the minimum, then output left to right.

Complexity: O(N)