Skip to content

Commit 7c31c5b

Browse files
samirmsallemSamir M'Sallemsiriak
authored
Add else clause for node (TheAlgorithms#3014)
Co-authored-by: Samir M'Sallem <samir.msallem@valtech-mobility.com> Co-authored-by: Andrii Siriak <siryaka@gmail.com>
1 parent 64f1e51 commit 7c31c5b

File tree

1 file changed

+2
-0
lines changed
  • src/main/java/com/thealgorithms/datastructures/hashmap/hashing

1 file changed

+2
-0
lines changed

src/main/java/com/thealgorithms/datastructures/hashmap/hashing/HashMap.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ private void delete(Node n, int key) {
105105
} else {
106106
n.setNext(n.getNext().getNext());
107107
}
108+
} else {
109+
delete(n.getNext(), key);
108110
}
109111
}
110112

0 commit comments

Comments
 (0)