Greedy Sorting (updated)

Minor changes to improve readability.  Functionality and algorithm
remain the same.