TRIES STUDY GUIDE


Terminology and Basics

Hash Tables and LLRBs with String keys Tries TSTS

Recommended Problems

C level

  1. Spring 2008 Final, #5
  2. Spring 2008 Final, #4
  3. Fall 2011 Final, #8
  4. Fall 2012 Final, #8
  5. Textbook 5.2.3, 5.2.4

B level

  1. Fall 2009 Final, #5
  2. Spring 2012 Final, #9
  3. Textbook 5.2.21 (just design the API)
  4. When would we want to use an R-way trie instead of a TST?
  5. Give a worst case input that causes a TST to be unbalanced (and thus slow).
  6. Is the number of character compares in an R-way trie strictly better than for an LLRB? For a hash table? Is a trie guaranteed to be faster in overall run time than an LLRB or a hash table?

A level

  1. When might we want to use a hash table instead of a TST?
  2. What would happen if we had an R-way trie where we keep our next nodes in a linked list? How would this affect memory performance? Timing? What if we used an LLRB? A hash table?
  3. Repeat Spring 2013 midterm problem #8, but assume your keys are Strings instead of Comparables.