Computing - Hash Tables
AQA Computer Science 2022
Hash tables and keys
What is the main advantage of a hash table?
You can quickly find items given a key.
Hashing and collisions
What is a hashing algorithm?
A calculation applied to a key to transform it into an address.
What is it called when a hash function generates the same value for two different inputs?
A collision.
What is it called when you find a new place for a value after two inputs have the same hash?
Open addressing.
Load factor and hash computation
What is the formula for load factor?
What can load factor be used for?
Calculating when it is necessary to allocate more space to store something.
Once a hash has been calculated, what operation is used to normalise it to the length of the array?
What is a common method of calculating a hash for a string?
Adding together the ASCII numbers of the characters.