Skip to content

Commit 10c9ef5

Browse files
committed
fix: add condition for moving pointer to next nodes.
1 parent 4ad6d93 commit 10c9ef5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/chapter03linkedlists/DoublyLinkedList.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ public synchronized void removeMatched(DLLNode node) {
163163
p.next.prev = p.prev;
164164
return;
165165
}
166+
p = p.getNext();
166167
}
167168
}
168169

0 commit comments

Comments
 (0)