In the context of universal hashing, what makes a family of hash functions 'universal'?
The property that the probability of collision between any two keys is bounded
Its use of a single, universally applicable hash function
Its ability to adapt to any data distribution
The guarantee of zero collisions for any input set
How does an increasing load factor generally impact the performance of a hashmap?
It improves performance by reducing memory usage.
It degrades performance due to a higher probability of collisions.
It depends on the specific hash function being used.
It has no significant impact on performance.
What is the purpose of dynamic resizing (rehashing) in a hashmap?
To increase the size of the hash function's output range.
To reduce the number of keys stored in the hashmap.
To maintain a low load factor and prevent performance degradation.
To improve the efficiency of key deletion operations.
In a system where memory usage is a major concern, what trade-off should be considered when using a hashmap?
Collision resolution strategies have no impact on memory consumption.
A larger hash table size generally results in faster lookups but consumes more memory.
Hashmaps always use less memory than arrays for storing the same data.
Using a complex hash function always reduces collisions and memory usage.
In the context of hash functions, what does the avalanche effect refer to?
A small change in input causing a significant change in output
Gradual degradation of hash performance over time
Uneven distribution of keys within the hash table
Increased likelihood of hash collisions with larger datasets
When choosing a collision resolution strategy for a hash table, which factors are essential to consider?
All of the above
Expected data distribution and load factor
Size of the keys and values being stored
Programming language and hardware architecture
When does rehashing typically occur in a hashmap?
When the hashmap is cleared using the clear() method.
When the hash function is modified.
Every time a new key is inserted.
When the load factor exceeds a predetermined threshold.
In the context of hashmaps, what does 'probing' refer to?
Searching for a specific key in the hashmap.
Determining the load factor of the hashmap.
Finding an alternative slot for a key when a collision occurs.
Resizing the underlying array to accommodate more keys.
How does the choice of a hash function impact the performance of a hashmap?
A complex hash function guarantees a lower collision rate, improving performance.
The hash function has a negligible impact on performance compared to the data structure itself.
A well-chosen hash function minimizes collisions, leading to faster lookups and insertions.
A simple hash function is always preferred as it reduces computational overhead.
In a hash table using separate chaining for collision resolution, what is the worst-case time complexity for searching for an element?
O(n)
O(n log n)
O(1)
O(log n)