Input (grade 13): The following algorithm generates the next permutation lexicographically after a given permutation. It changes the given permutation in-place.
Output (grade 11): A permutation can be changed into another permutation by simply switching two or more of the objects.