Skip to content

Commit 47201a3

Browse files
committed
Merge pull request #23 from prateekkhurana/master
BUG: Deletion in doubly linked list is not proper.
2 parents 0183240 + 4c83a06 commit 47201a3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

data-structures/doubly-linked-list/doubly-linked-list.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ DoublyLinkedList.prototype = {
162162

163163
//skip over the item to remove
164164
current.prev.next = current.next;
165+
current.next.prev = current.prev;
165166
}
166167

167168
//decrement the length

0 commit comments

Comments
 (0)