Page 1 of 1

Question #6 (10 points) Consider a hash table with 10 slots, which uses the hash function h(k) = k mod 10 to hash intege

Posted: Mon May 09, 2022 7:16 am
by answerhappygod
Question 6 10 Points Consider A Hash Table With 10 Slots Which Uses The Hash Function H K K Mod 10 To Hash Intege 1
Question 6 10 Points Consider A Hash Table With 10 Slots Which Uses The Hash Function H K K Mod 10 To Hash Intege 1 (97.17 KiB) Viewed 26 times
Question #6 (10 points) Consider a hash table with 10 slots, which uses the hash function h(k) = k mod 10 to hash integer keys. Provide clear, concise answers to each of the following related questions. • (5 points). Assume the hash table uses linear probing to resolve colli- sions. Provide a sequence of five keys k with the following characteristics: - If the table begins empty, the key sequence does not result in any collisions. – If the table begins with one slot taken, the key sequence results in worst-case collision performance. Be sure to identify the first slot you assume to be taken. 4 • (5 points). Assume the hash table uses quadratic probing to resolve collisions, with cı = 1 and C2 = 2. Provide a sequence of five keys k with the following characteristics: – If the table begins empty, the key sequence does not result in any collisions. If the table begins with one slot taken, the key sequence results in worst-case collision performance. Be sure to identify the first slot you assume to be taken.