We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 97926b1 commit ecc8c65Copy full SHA for ecc8c65
src/data-structures/linked-list/LinkedList.js
@@ -65,7 +65,8 @@ export default class LinkedList {
65
66
let deletedNode = null;
67
68
- // 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
69
+ // from the head to be a new head.
70
while (this.head && this.compare.equal(this.head.value, value)) {
71
deletedNode = this.head;
72
this.head = this.head.next;
0 commit comments