Chapter 6 greedySorting