[28] part a complete. Sorts by length