Sort the list based on number.