Tag: hash map
Java interview for developer. Collections. Part 3 - Maps and Trees
This is the last part of java interview questions for collections. Here is part one and two. 13. In what case you could "lost" element in HashMap? This question is tricky, it's simple to understand, but it is not so transparent at the first glance. Let's imagine a case, when…
Small picture about data structures
When I've posted the first time my article Java interview for a developer. Collections. Part 2 - Maps. there was a huge discussion about the fact that the worst time complexity of add, remove and search operations are equal to lg N, if hash-function steady placed elements in buckets. A…
Java interview for developer. Collections. Part 2 - Maps.
This is new part of java interview questions. Here is part one. 7. How does HashMap work? I suppose this is the second most popular question on Java collections. I even don't remember interview, where I wasn't asked for this question. Let's look on HashMap briefly. HashMap consists of "buckets"…