11.4-1 Consider inserting the keys 10,22, 31, 4, 15, 28, 17, 88, 59 into a hash table of length m = 11 using open addressing with the auxiliary hash function h'(k) = k. Illustrate the result of inserting these keys using linear probing, using quadratic probing with c₁ = 1 and c₂ = 3, and using double hashing with h₁(k) = k and h2(k)=1+(k mod (m-1)). CHAINED-HASH-INSERT (T, x) 1 insert x at the head of list T[h(x.key)] CHAINED-HASH-SEARCH (T, k) 1 search for an element with key k in list T[h(k)] CHAINED-HASH-DELETE (T, x) 1 delete x from the list T[h(x.key)]

icon
Related questions
Question

I need help with the attached question

11.4-1
Consider inserting the keys 10,22, 31, 4, 15, 28, 17, 88, 59 into a hash table of
length m = 11 using open addressing with the auxiliary hash function h'(k) = k.
Illustrate the result of inserting these keys using linear probing, using quadratic
probing with c₁ = 1 and c₂ = 3, and using double hashing with h₁(k) = k and
h2(k)=1+(k mod (m-1)).
Transcribed Image Text:11.4-1 Consider inserting the keys 10,22, 31, 4, 15, 28, 17, 88, 59 into a hash table of length m = 11 using open addressing with the auxiliary hash function h'(k) = k. Illustrate the result of inserting these keys using linear probing, using quadratic probing with c₁ = 1 and c₂ = 3, and using double hashing with h₁(k) = k and h2(k)=1+(k mod (m-1)).
CHAINED-HASH-INSERT (T, x)
1 insert x at the head of list T[h(x.key)]
CHAINED-HASH-SEARCH (T, k)
1 search for an element with key k in list T[h(k)]
CHAINED-HASH-DELETE (T, x)
1 delete x from the list T[h(x.key)]
Transcribed Image Text:CHAINED-HASH-INSERT (T, x) 1 insert x at the head of list T[h(x.key)] CHAINED-HASH-SEARCH (T, k) 1 search for an element with key k in list T[h(k)] CHAINED-HASH-DELETE (T, x) 1 delete x from the list T[h(x.key)]
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer