Which of the following is NOT a collision handling technique in hashmaps?
Separate Chaining
Open Addressing
Linear Probing
Binary Search
What is a significant disadvantage of using a hashmap when you need to retrieve elements in a sorted order?
Hashmaps don't inherently maintain order.
Hashmaps cannot handle duplicate values.
Hashmaps have slow insertion times.
Hashmaps have high memory consumption.
Which of the following operations typically has a time complexity of O(n) in the worst case for a hashmap?
Search
Insertion
Deletion
All of the above
What is linear probing in the context of open addressing for collision resolution?
Resizing the hash table to accommodate more elements.
Using a linked list to store colliding elements at the same index.
Using a different hash function to avoid collisions.
Probing for an empty slot by sequentially searching from the collision index.
In hashmap terminology, what does a 'bucket' typically refer to?
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.
The load factor of the hashmap.
Which of the following is NOT a typical operation supported by hashmaps?
Sort
Insert
Delete
Which collision resolution technique is commonly used in hashmaps?
Bubble Sort
Merge Sort
If you were designing a simple hash function for strings, which operation would likely be a core component?
Finding the length of the string.
Converting characters to their ASCII codes and performing arithmetic operations.
Sorting the characters in the string alphabetically.
Reversing the string.
Why is a good hash function important for hashmap performance?
To minimize the number of comparisons required to find an element.
To allow for efficient resizing of the hash table.
To reduce the memory used by the hash table.
To ensure that keys are evenly distributed across the hash table, reducing collisions.
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)
O(n log n)