Top "Hashset" questions

A HashSet encapsulates operations that allow for the comparison of elements in collections.

HashSet contains problem with custom objects

My Custom class that will be contained by HashSet public class Person { String name; int age; public Person(String name, …

java hashcode hashset
Understanding contains method of Java HashSet

Newbie question about java HashSet Set<User> s = new HashSet<User>(); User u = new User(); u.…

java contains hashset
Java Hashset.contains() produces mysterious result

I don't usually code in Java, but recently I started not having a choice. I might have some major misunderstanding …

java equals hashcode contains hashset
How does HashSet not allow duplicates?

I was going through the add method of HashSet. It is mentioned that If this set already contains the element, …

java hashmap hashset
Removing null references from a HashSet

Is there a simple way of removing null references from a HashSet like the way we can delete them from …

java null set hashset
std::hash_set vs std::unordered_set, are they the same thing?

I know hash_set is non-standard and unordered_set is standard. However, I am wondering, performance wise, what is the …

c++ optimization stl hash hashset
The HashSet<T>.removeAll method is surprisingly slow

Jon Skeet recently raised an interesting programming topic on his blog: "There's a hole in my abstraction, dear Liza, dear …

java performance collections hashset
Is there a way to get the difference between two sets of objects in c#

I want to get the difference between two sets of ints in c#. Given s1 and s2 I want to …

c# .net linq hashset
How to implement ConcurrentHashSet in .Net

I am trying to implement a ConcurrentHashSet in the spirit of ConcurrentDictionary, approach taken is to use a internal backing …

c# .net concurrency dictionary hashset
C# Hashset Contains Non-Unique Objects

Using this class public class Foo { public string c1, c2; public Foo(string one, string two) { c1 = one; c2 = two; } …

c# hashset