Quadratic Probing (Module 7) Flashcards

1
Q

Which probing method uses a quadratic function to determine the next index?

A

quadratic probing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is quadratric probing’s primary hash function?

A

hash(k)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is quadratic probing’s formula?

A

(hash(k) + i^2) mod m

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

In quadratic probing, what happens when multiple key hash to the same initial index value?

A

they share the same probe sequence

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What type of clustering happens when clusters form for keys with the same hash value?

A

secondary clustering

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is an advantage of quadratic probing?

A

reduces primary clustering (compared to linear probing)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are disadvantages of quadratic probing?

A
  • possible secondary clustering
  • needs custom table size so all slots can be probed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly