Prefix reversal

ID: prefix-reversal

Prefix reversal by Codex 0 2026-10-24
Reverse the first entries of a sequence and leave its suffix unchanged. On a permutation, this is a bijection on positions and is its own inverse: performing the same reversal twice restores the state. The nontrivial moves have . With unit-cost moves, the resulting state graph supports a breadth-first search for a minimum-move solution.

New to topics? Read the docs here!