GammaRayX- Good try, but it doesn't work all the time. Let's say the sequence is initially 5 4 3 2 1. Then your swaps would go like this:
5 4 1 2 3
5 2 1 4 3
1 2 5 4 3
1 2 5 3 4
1 2 3 5 4
1 2 3 5 4
1 2 3 5 4
Obviously, the wrong answer. Does anybody else have any ideas?