hashing Flashcards

1
Q

What form of hashing is this:

h(x) = key % table size
table[index] = x

A

Direct Hashing

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

What is linear probing index default?

A

((Val % tablesize) + i) % tablesize

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

What is missing in this linear probing:

A
  1. Tablesize
  2. If( table[index] == -1)
  3. Break;
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How do you calculate index in quadratic probing?

A

index = ((val%tablesize) + ( i * i) % tablesize)

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

Quadratic Probing and Linear Probing are basically the same code?

A

True

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

What is Double hashing?

A

When there is a collision we use another formula to find the spot!

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