EEL 4851 Final
Summer 1999
Tuesdays and Thursdays 8:00 AM
NAME_____________________________
SS#_____________________________
Note: For all questions, an explanation of your answer allows me to give partial credit if the answer is
wrong.
1.
Short questions
. For each question you
must
explain your answer. Write neatly. I can not give you
credit if I can not read your answer.
a. What is the best sorting algorithm for sorting a list where the items are in a file and it takes a long
time to swap the items.
b. What is the advantage of using a heap instead of a binary search tree to implements a priority queue.
c. When balancing an AVL tree why do we sometimes need a single rotation and other times a double.
h. If I use a hash table with 1,000 buckets to store social security numbers (9 digit number) will the
sum of all of the digits
make a good hash function?
This
preview
has intentionally blurred sections.
Sign up to view the full version.
i. What is the advantage of using double hashing over quadratic probing?
j. What is the best sorting algorithm if the list is almost sorted.

This is the end of the preview.
Sign up
to
access the rest of the document.
- Summer '09
- Dijkstra, good hash function, best sorting algorithm
-
Click to edit the document details