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 c71a95e commit f5648adCopy full SHA for f5648ad
src/lineards/linkedlist/LinkedList.java
@@ -85,6 +85,7 @@ public void deleteByValue(char value) {
85
if (head.data == value) {
86
// Delete the head
87
head = head.next;
88
+ return;
89
}
90
Node pred = head;
91
Node temp = head.next;
@@ -111,6 +112,7 @@ public void deleteLast() {
111
112
if (head.next == null) {
113
// There is only one node
114
head = null;
115
116
117
118
0 commit comments