diff --git a/1-Fundamentals/1-3-BagsQueuesStacks/DoublyLinkedList.java b/1-Fundamentals/1-3-BagsQueuesStacks/DoublyLinkedList.java index d55988b..346876e 100644 --- a/1-Fundamentals/1-3-BagsQueuesStacks/DoublyLinkedList.java +++ b/1-Fundamentals/1-3-BagsQueuesStacks/DoublyLinkedList.java @@ -188,8 +188,8 @@ else if (node == last) node.parent = null; DoubleNode prev = node.prev, next = node.next; - prev.next = node.next; - next.prev = node.prev; + prev.next = next; + next.prev = prev; N--; return node.item; }