Solve Exercise 5-14: reverse sort