Question #2


Generate 300 character strings consisting of random upper case letters and having random lengths of from 1 to 10 characters.

Display the strings in a manner consistent with the following constraints:

  1. The strings are to appear linearly ordered by length, longest to shortest.

  2. Within each length grouping, the strings are to be ordered according to the number of distinct letters contained in the string, most distinct letters to least distinct letters.

  3. Within each distinct letter grouping, the strings are to appear alphabetically ordered.