How is a HashSet working? - Cracking the Java Coding Interview

preview_player
Показать описание
Cracking the #Java #Coding #Interview - Question 178: How is a HashSet working?
Рекомендации по теме
Комментарии
Автор

Yet another good example, why immutables (like records) are a good idea.

slartidan
Автор

You can mutate the state of the key of an object, as long as you remove the object before the mutation then re-add it afterwards.

kevintyrrell
Автор

I really hope this series never ends :)

mrcnkkl
Автор

Where can I get that cup? It's amazing!

chiefx
Автор

Great Tip to not mutate your objects after you put them into a HashSet!

devAleksander
Автор

So question 179 : What is the utility of a Hashset ? Thank you 🙏

iam
Автор

Why this guys name missing from title or description? Can anyone remind me of his name?

faisal
Автор

I don't quite understand why HashSet uses HashMap in its implementation. Isn't it a bit wasteful to store an entire redundant reference (PRESENT) for every single entry in the HashSet?

jay_
Автор

It's embarrassing how Java has not optimized HashSet in 20 years to consume less memory.

ZelenoJabko
Автор

The question "How is a HashSet working?" is not idiomatic English: you must ask "How does a HashSet work?" instead.

dglynch