Consider a hash table with 10 slots, which uses the hash function h(k)= k mod 10 to hash integer keys. Provide clear, co
Posted: Mon May 09, 2022 7:17 am
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.
(5 points). Assume the hash table uses quadratic probing to resolve collisions, with a = 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.
(5 points). Assume the hash table uses quadratic probing to resolve collisions, with a = 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.