In the context of amortized analysis of hash table operations, what does the term "amortized" refer to?
The worst-case time complexity of an operation.
The time complexity of an operation when the hash table is full.
The average time complexity of an operation over a sequence of operations.
The best-case time complexity of an operation.
In the context of hash tables, what does a high load factor indicate?
Lower memory usage.
A higher probability of collisions.
Faster insertion operations.
A more efficient hash function is being used.
In a web server implemented using a hashmap to store cached web pages, which collision resolution strategy is generally preferred for its performance in handling a high volume of concurrent requests?
Open Addressing with linear probing
Separate Chaining with linked lists
Double Hashing
Separate Chaining with balanced binary search trees
How does using a cryptographic hash function with a random salt improve the security of a hashmap storing user credentials?
It prevents unauthorized users from accessing the hashmap's keys.
It encrypts the data stored in the hashmap, making it unreadable without the decryption key.
It makes it significantly harder for attackers to perform rainbow table attacks.
It eliminates the possibility of hash collisions.
How can a hash flooding attack impact the performance of a web server using a hashmap to store session data?
It can cause a denial-of-service by forcing the server to handle a large number of collisions.
It can lead to increased memory usage and faster response times.
It can improve the efficiency of the hashmap by distributing data more evenly.
It has no impact on performance, as hash flooding attacks only target data integrity.
Which collision resolution strategy generally performs better in terms of cache locality?
Open Addressing
Separate Chaining
Both perform equally well
Cache locality is irrelevant to hash tables
You are designing a system to store and retrieve frequently accessed data with high performance. Which of the following hash table collision resolution strategies would generally offer the BEST performance under high load factors?
Linear Probing
Quadratic Probing
Python dictionaries use open addressing for collision resolution. Which of the following techniques helps mitigate the performance degradation caused by clustering in open addressing?
Linear Probing with a prime step size
Robin Hood Hashing
Using a cryptographic hash function
Why is it generally recommended to avoid using mutable objects as keys in hash tables?
Mutable keys can lead to inconsistent state if their values are modified after being inserted into the hash table.
Hash tables cannot store mutable objects as keys; only immutable objects are allowed.
Using mutable keys increases the memory overhead of the hash table.
Mutable keys make the implementation of the hash table significantly more complex.
What mechanism does Java's ConcurrentHashMap employ to allow for concurrent reads and updates while maintaining thread safety?
Fine-grained locking at the bucket level
Lock-free data structures using atomic operations
A single global lock for all operations
Read-write locks separating readers and writers