Complete the sentence to explain how hash tables find data quickly.
Hash tables use a [1] function to find the storage location of data.The hash function converts a key into an index, allowing quick access to data.
Complete the sentence to describe the average time complexity of hash table lookup.
Hash tables provide an average lookup time complexity of [1].Hash tables allow data to be found in constant time, which is O(1) on average.
Fix the error in the explanation about hash table collisions.
When two keys hash to the same index, it is called a [1].A collision happens when different keys produce the same hash index.
Fill both blanks to explain how hash tables handle collisions.
Hash tables handle collisions using [1] or [2] methods.
Two common methods to handle collisions are chaining (using linked lists) and open addressing (finding another open slot).
Fill all three blanks to complete the explanation of why hash tables have O(1) lookup.
The [1] function converts keys to [2] which point to [3] in the table.
The hash function creates indexes that point to locations where data is stored, enabling fast lookup.