CS410, Summer 1998 Quiz #6 July 15 Name: Consult no sources. 1. What is the worst case time for lookup in a hash table? 2. What is the time for lookup in a hash table "if hashing behaves"? 3. What is the definition of a "load factor" for a hash table? 4. What is the two-stage process used to determine where a piece of data should go in a hash table? ANSWERS ======= 1. O(n) where n is the number of elements in the table 2 points -- 1.5 points if n is not defined. 2. O(1). 2 points. 3. Number of elements/number of buckets. 3 points -- 1.5 points for flipping the fraction 4. Transform to integer, hash to bucket. 3 points -- 1.5 points for each step.