hashing Flashcards
1
Q
What form of hashing is this:
h(x) = key % table size
table[index] = x
A
Direct Hashing
2
Q
What is linear probing index default?
A
((Val % tablesize) + i) % tablesize
3
Q
What is missing in this linear probing:
A
- Tablesize
- If( table[index] == -1)
- Break;
4
Q
How do you calculate index in quadratic probing?
A
index = ((val%tablesize) + ( i * i) % tablesize)
5
Q
Quadratic Probing and Linear Probing are basically the same code?
A
True
6
Q
What is Double hashing?
A
When there is a collision we use another formula to find the spot!