Minimum Operations to Sort a Permutation
Search arrangements reachable by reversing the whole array or rotating it left. The first time sorted order appears, its depth is the answer.
Search arrangements reachable by reversing the whole array or rotating it left. The first time sorted order appears, its depth is the answer.