Permutation Sorter
Amazon interview questions · Hard · OA round · 6 tests
Sort a permutation using only whole-array reverse and one-step left rotation, taking the minimum number of operations.
The full question, tests and reference solution are available with a plan that includes Amazon.
Run your code with Ctrl+Enter to see results.