Skip to content

Commit 783c5bb

Browse files
author
jsquared21
committed
Decrease size in MyHashMap.remove
1 parent 5d72fd3 commit 783c5bb

File tree

2 files changed

+1
-0
lines changed

2 files changed

+1
-0
lines changed
14 Bytes
Binary file not shown.

Exercise_27/Exercise_27_04/MyHashMap.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ public void remove(K key) {
174174

175175
if (table.get(index).getKey() == key) {
176176
table.remove(index);
177+
size--; // Decrease size
177178
}
178179
}
179180

0 commit comments

Comments
 (0)