Problem 775 · Medium

Global and Local Inversions

Every local inversion is global, so the counts match only when no value is more than one slot from home.

Open the interactive visualisation