Sort algorithms exercise.