Add a flag to each branch of cycle_sort(), and print the result at the end of the program.
Add a flag to each branch of cycle_sort(), and print the result at the end of the program.