Home > Articles > Programming > Algorithms

Like this article? We recommend

Like this article? We recommend

Exercises

Exercises

  1. Develop a sort implementation that counts the number of different key values, then uses a symbol table to apply key-indexed counting to sort the array. (This method is not for use when the number of different key values is large.)
  2. Give a trace for LSD string sort for the keys
  3. no is th ti fo al go pe to co to th ai of th pa

  4. Give a trace for MSD string sort for the keys
  5. no is th ti fo al go pe to co to th ai of th pa

  6. Give a trace for 3-way string quicksort for the keys
  7. no is th ti fo al go pe to co to th ai of th pa

  8. Give a trace for MSD string sort for the keys
  9. now is the time for all good people to come to the aid of

  10. Give a trace for 3-way string quicksort for the keys
  11. now is the time for all good people to come to the aid of

  12. Develop an implementation of key-indexed counting that makes use of an array of Queue objects.
  13. Give the number of characters examined by MSD string sort and 3-way string quicksort for a file of N keys a, aa, aaa, aaaa, aaaaa, . . .
  14. Develop an implementation of LSD string sort that works for variable-length strings.
  15. What is the total number of characters examined by 3-way string quicksort when sorting N fixed-length strings (all of length W), in the worst case?

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.