Sort the number bars from small to large in as few swaps as possible. Then compare your moves with sorting algorithms.
Tap two bars to swap them. Sort small to large (left to right)