Insert the characters of the string K R P C S N Y T J M into a hash table of…

PYQ GATE 1996

Insert the characters of the string K R P C S N Y T J M into a hash table of size 10.

Use the hash function H(x) = (ord(x) − ord(‘a’) + 1) mod 10 and linear probing to resolve collisions.

(a) Which insertions cause collisions?

(b) Display the final hash table?

Attempted by 2 students.

Sign up free to check your answer

Sign up free

Explore the full course: Data Structures

Loading lesson…