Let's say we have a permutation {1,2,3,...,n}.\{1, 2, 3, ..., n\}. We say a swap of a permutation is the interchanging of any two elements of the permutation, for example in {1,2,4,3}\{1, 2, 4, 3\} we can swap 22 and 33 to get {1,3,4,2}.\{1, 3, 4, 2\}.

What is the minimum number of swaps needed to turn {1,2,3,4}\{1, 2, 3, 4\} into {2,3,4,1}?\{2, 3, 4, 1\}?

Choose one answer

Type a concept, like “slope” or “photosynthesis”.

↑ ↓ to choose · Enter to openSearch explanations and problems