Swaps in Permutation
Swaps in PermutationYou are given a permutation of the numbers1, 2, ..., nandmpairs of positions(aj, bj).At each step you can choose a pair from the given positions and swap the numbers...