Question: Task 3.4.12 (from the book Algorithms, 4th edition, Princeton Uni.) Suppose that the keys A through G, with the hash values given below, are inserted
Task 3.4.12 (from the book Algorithms, 4th edition, Princeton Uni.)
Suppose that the keys A through G, with the hash values given below, are inserted in some order into an initially empty table of size 7 using a linear-probing table (with no resizing for this problem),
| key | A | B | C | D | E | F | G |
| hash(M = 7) | 2 | 0 | 0 | 4 | 4 | 4 | 2 |
Which of the following could not possibly result from inserting these keys?
a) E F G A C B D b) C E B G F D A c) B D F A C E G d) C G B A D E F e) F G B D A C E f) G E C A D B F
Give the minimum and the maximum number of probes that could be required to build a table of size 7 with these keys, and an insertion order that justifies your answer.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
