Skip to content

Commit ddb0616

Browse files
committed
HashSet with separate chaining
1 parent 286f7cf commit ddb0616

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using Algorithms.DataStructures.HashMap;
2+
3+
namespace Algorithms.DataStructures.HashSet
4+
{
5+
public class HashSetWithSeparateChaining<T> : HashMapWithSeparateChaining<T,T>
6+
{
7+
public void Add(T item)
8+
{
9+
this[item] = item;
10+
}
11+
12+
public bool Contains(T item)
13+
{
14+
return ContainsKey(item);
15+
}
16+
}
17+
}

0 commit comments

Comments
 (0)