Sorting program that uses stack overflow solutions to sort a list