Please do both questions. Thank you in advance. Subject- Security Governance Type 1: Calculation of hash values for given keys – In this type of questions, hash values are computed by applying given hash function on given keys. Que – 1. Given the following input (4322, 1334, 1471, 9679, 1989, 6171, 6173, 4199) and the hash function x mod 10, which of the following statements are true? i. 9679, 1989, 4199 hash to the same value ii. 1471, 6171 has to the same value iii. All elements hash to the same value iv. Each element hashes to a different value (A) i only (B) ii only (C) i and ii only (D) iii or iv Type 2: Insertion of keys into hash table using linear probing as collision resolution technique – In linear probing technique, collision is resolved by searching linearly in the hash table until an empty location is found. Que – 2. The keys 12, 18, 13, 2, 3, 23, 5 and 15 are inserted into an initially empty hash table of length 10 using open addressing with hash function h(k) = k mod 10 and linear probing. What is the resultant hash table?
Please do both questions. Thank you in advance.
Subject- Security Governance
Type 1: Calculation of hash values for given keys –
In this type of questions, hash values are computed by applying given hash function on given keys.
Que – 1. Given the following input (4322, 1334, 1471, 9679, 1989, 6171, 6173, 4199) and the hash function x mod 10, which of the following statements are true?
i. 9679, 1989, 4199 hash to the same value
ii. 1471, 6171 has to the same value
iii. All elements hash to the same value
iv. Each element hashes to a different value
(A) i only
(B) ii only
(C) i and ii only
(D) iii or iv
Type 2: Insertion of keys into hash table using linear probing as collision resolution technique –
In linear probing technique, collision is resolved by searching linearly in the hash table until an empty location is found.
Que – 2. The keys 12, 18, 13, 2, 3, 23, 5 and 15 are inserted into an initially empty hash table of length 10 using open addressing with hash function h(k) = k mod 10 and linear probing. What is the resultant hash table?
Trending now
This is a popular solution!
Step by step
Solved in 2 steps