We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5368db6 commit 2f31c7dCopy full SHA for 2f31c7d
src/main/java/com/thealgorithms/datastructures/hashset/HashSet.java
@@ -27,9 +27,9 @@ public class HashSet {
27
28
@SuppressWarnings("unchecked")
29
public HashSet() {
30
- buckets = new LinkedList[INITIAL_CAPACITY];
+ buckets = (LinkedList<Integer>[]) new LinkedList[INITIAL_CAPACITY];
31
for (int i = 0; i < INITIAL_CAPACITY; i++) {
32
- buckets[i] = new LinkedList<>();
+ buckets[i] = new LinkedList<Integer>();
33
}
34
size = 0;
35
0 commit comments