Generating permutations in minimal change ordering

Sign in to test your solution.