Enter a permutation: and .
Or create a random permutation of length and .
The first line shows the original permutation. In each line, the two marked intervals denote the blocks that are interchanged.
Copyright 2007 Marcel Martin