NEW
Font size
WorksheetsHash Tables Quiz
Total questions: 15
Worksheet time: 8mins
What is the goal of a hash table?
To compare items in a data set
To store all the data items
To immediately find an item without comparing other items
To implement a dictionary data structure
What is a hashing function used for?
To calculate the position of an item in a hash table
To determine the size of a hash table
To compare items in a data set
To implement a dictionary data structure
What is a collision in a hash table?
When two data items have the same hash value
When a hash table is too small to store all the data items
When a hashing function takes too long to calculate
When a hash table is empty
What is a disadvantage of linear probing?
It prevents other items from being stored in their correct location
It requires a large amount of memory
It results in a high number of collisions
It is a slow method of resolving collisions
What is rehashing in a hash table?
Finding an alternative position for items in the hash table
Using a two-dimensional hash table
Storing items in a linked list
Searching sequentially in an overflow table
What is chaining in a hash table?
Storing items in a linked list
Using a two-dimensional hash table
Searching sequentially in an overflow table
Finding an alternative position for items in the hash table
What is the typical use of a hash table?
Linking a file name to the file path
Sorting a large dataset
Performing calculations on a data set
Creating a dictionary data structure
What are the three basic operations that can be performed on a hash table?
Adding a value, deleting a value, retrieving a value
Sorting a value, searching a value, updating a value
Copying a value, moving a value, renaming a value
Creating a value, reading a value, updating a value
What is the purpose of the book 'Essential Algorithms for A Level Computer Science'?
To cover all the data structures and algorithms needed for A Level Computer Science
To provide additional resources for understanding data structures
To teach programming languages and their syntax
To explain the concept of hashing functions
What is the advantage of using a larger hash table?
It reduces the chance of collisions
It speeds up the hashing function
It allows for more efficient linear probing
It minimizes the memory footprint
What is the disadvantage of using a smaller hash table?
It increases the chance of collisions
It slows down the hashing function
It requires more memory
It prevents linear probing
What is the purpose of a two-dimensional hash table?
To store multiple items at the same position
To prevent collisions in a hash table
To speed up the hashing function
To reduce the memory footprint
What is the purpose of an overflow table in a hash table?
To store items that cannot be placed in the hash table
To prevent collisions in a hash table
To speed up the hashing function
To reduce the memory footprint
What is the purpose of a linked list in a hash table?
To store items that cannot be placed in the hash table
To prevent collisions in a hash table
To speed up the hashing function
To reduce the memory footprint
What are hash tables commonly used for?
Linking file names to file paths
Sorting large datasets
Performing calculations on data sets
Creating dictionary data structures
