HashQuiz

advertisement
Hashing Multiple Choice Quiz:
1. What causes a collision?
a. The program you are running crashes
b. There are too many hash keys in the
array
c. Two hash keys are the same
d. The program is out of memory
e. None of the above
2. What are the three types of collision
solutions?
a. Overflow, underflow and undertow
b. Chaining, overflow and probing
c. Probing, underflow and chaining
d. Noflow, fastflow and chaining
e. None of the above
3. What does hashing improve?
a. Speed
b. Eye-stress
c. Mood
d. Hard drive space
e. All of the above
4. What does hashing do?
a. Delete old files
b. Create new files
c. Improve the air quality of the room
d. Make you happy
e. None of the above
5. How is a hash key computed?
a. Long division
b. Subtraction
c. Random number generation
d. Modulo division
e. All of the above
6. What can be done to compute the hash key
value of a string?
a. Convert them all to their ASCII values
b. Generate random numbers for the
letters every time
c. Give them each a value according to
their place in the alphabet
d. a and b only
e. a and c only
f. b and c only
7. What is a restriction of the regular 'Direct
Address Tables'?
a. The range of the key must be
severely bounded
b. The range of the key is unlimited.
c. It takes up too much memory on the
hard drive
d. It is far too slow
8. What is the hash key of 954 if the number
being used to divide is 3?
a. 9
b. 2
c. 5
d. 0
e. None of the above
9. What 7564%5?
a. 3
b. 11
c. 4
d. 7
10. What is the hash key value of ‘Donaldson’ if
you assign each letter its corresponding
number in the alphabet (ie f = 6) and if you
use 9 as the divisor?
a. 12
b. 3
c. 7
d. 9
e. None of the above
Download