Skip to content

Commit a68c19b

Browse files
authored
Merge pull request phishman3579#48 from Kietzmann/ProbingHashMapFix
Fixed bug in ProbingHashMap - clear() method was not clearing array
2 parents a159900 + c18be2d commit a68c19b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/com/jwetherell/algorithms/data_structures/HashMap.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ public V remove(K key) {
514514
@Override
515515
public void clear() {
516516
for (int i=0; i<array.length; i++)
517-
array = null;
517+
array[i] = null;
518518
size = 0;
519519
}
520520

0 commit comments

Comments
 (0)