[prev] [index] [next]

Exercise: sorting

By default, sort() uses lexical (string) comparison.

Produce calls to sort that achieve

  • sorting in ascending numeric order
  • sorting in descending numeric order
  • sorting in descending lexical order