This question evaluates understanding of hash table data structures and hashing-based collision handling, including familiarity with Java HashMap internals, bucket organization and alternative collision-resolution strategies and their performance implications.
In Java, describe the underlying data structures used by HashMap (e.g., array of buckets, linked lists vs tree bins) and how they evolved across Java versions. Besides separate chaining, what alternative collision-resolution strategies (e.g., linear/quadratic probing, double hashing, cuckoo hashing, Robin Hood hashing) could be used, and what are their trade-offs in time/space and cache behavior?