Skip to content

Commit

Permalink
Adding line to modify previous pointer in case of deleting a node in …
Browse files Browse the repository at this point in the history
…doubly linked list.
  • Loading branch information
Prateek Khurana committed Apr 3, 2015
1 parent 0183240 commit 4c83a06
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions data-structures/doubly-linked-list/doubly-linked-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ DoublyLinkedList.prototype = {

//skip over the item to remove
current.prev.next = current.next;
current.next.prev = current.prev;
}

//decrement the length
Expand Down

0 comments on commit 4c83a06

Please sign in to comment.