See answer for week 2 question 4 on sorting.