Basic Java interview questions. Like how does HashMap deal with collision?
Anonimo
hashmap has buckets. So if there are 2 non equal elements with same hash they'll be put into same bucket (read linked list). if all elements have same hashcode access complexity will be O(n).