Skip to content

Commit 7f03c0c

Browse files
authored
Merge pull request careermonk#13 from itsmohitgoel/fix_dll_implementation
fix: add condition for moving pointer to next nodes.
2 parents ce99009 + 10c9ef5 commit 7f03c0c

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)