Skip to content

Commit

Permalink
Add comments to Linked List code.
Browse files Browse the repository at this point in the history
  • Loading branch information
trekhleb committed Jul 30, 2018
1 parent 97926b1 commit ecc8c65
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/data-structures/linked-list/LinkedList.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ export default class LinkedList {

let deletedNode = null;

// If the head must be deleted then make 2nd node to be a head.
// If the head must be deleted then make next node that is differ
// from the head to be a new head.
while (this.head && this.compare.equal(this.head.value, value)) {
deletedNode = this.head;
this.head = this.head.next;
Expand Down

0 comments on commit ecc8c65

Please sign in to comment.