Approach hintTry it first, then revealHide
Unwind the recursion: f(n) performs every swap of f(n - 1) and then one more, so the whole call is a fixed sequence of adjacent swaps. Work out where that sequence moves each element, then choose the input it sorts.