Hash Tables Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Define Hash Table

A

data structure that implements an associative array (dictionary)

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

Define Hash Function

A

algorithm that converts a hash key to a hash value

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

What must a hash function have

A
  • always produce the same hash value for the same key
  • provide a uniform distribution of hash values
  • minimise clustering
  • fast to compute
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Define collision (hash table)

A

occurs when the hash function produces the same hash value for two or more keys

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

Define linear probing

A

a solution to handling collisions, can probe sequentially or using an interval until an empty space is found

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

Define chaining

A

a solution to handling collisions, using linked lists by storing the pointer to where the data is stored

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