What is linear probing in the context of open addressing for collision resolution?
Using a linked list to store colliding elements at the same index.
Probing for an empty slot by sequentially searching from the collision index.
Resizing the hash table to accommodate more elements.
Using a different hash function to avoid collisions.
In hashmap collision resolution, what does separate chaining involve?
Using a secondary hash function to resolve collisions.
Storing colliding elements in a separate overflow area.
Finding the next available empty slot in the hash table.
Creating linked lists at each index of the hash table to store colliding elements.
What is the time complexity, in the average case, for searching for a key in a well-implemented hashmap?
O(1)
O(log n)
O(n log n)
O(n)
In hashmap terminology, what does a 'bucket' typically refer to?
The load factor of the hashmap.
The range of possible hash values produced by the hash function.
A linked list or other data structure used to handle collisions.
An individual element within the hashmap's array.
In hashmap terminology, what does 'collision' refer to?
When trying to delete a key that doesn't exist.
When two hashmaps have the same size.
When a hash function produces the same output for all inputs.
When two keys map to the same index in the hashmap.
Which of the following is NOT a typical operation supported by hashmaps?
Search
Sort
Delete
Insert
Which of these data structures is commonly used to handle collisions in hashmaps?
Linked List
Binary Tree
Heap
Queue
Which of the following data structures is commonly used to implement a hashmap?
Array
Tree
Graph
Which of these is a disadvantage of open addressing compared to separate chaining in hashmaps?
Cannot handle a large number of collisions efficiently.
Increased memory usage due to linked lists.
Clustering of elements can lead to performance degradation.
Requires more complex implementation compared to chaining.
What is a disadvantage of using hashmaps when the number of elements to be stored is not known in advance?
They are not suitable for storing data in a sorted order.
They are less memory-efficient than arrays for storing a fixed number of elements.
They are more complex to implement than linked lists.
They might require resizing, which can be an expensive operation.