Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ecc8c65

Browse files
committed
Add comments to Linked List code.
1 parent 97926b1 commit ecc8c65

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎src/data-structures/linked-list/LinkedList.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ export default class LinkedList {
6565

6666
let deletedNode = null;
6767

68-
// If the head must be deleted then make 2nd node to be a head.
68+
// If the head must be deleted then make next node that is differ
69+
// from the head to be a new head.
6970
while (this.head && this.compare.equal(this.head.value, value)) {
7071
deletedNode = this.head;
7172
this.head = this.head.next;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /