Ch. 5 Flashcards

1
Q

Hash functions

A

Map strings to numbers
-needs to be consistent
-needs to avoid conflicts
-can’t assign to a memory slot that isn’t available

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

Hash collision solution

A

Turn that memory slot into a linked list.

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

Load factor

A

Items in hash / #number of slots available

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

Hash resizing

A

Making a new array (typically 2x size) and moving hash table data to it.

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