mirror of
https://github.moeyy.xyz/https://github.com/trekhleb/javascript-algorithms.git
synced 2024-09-20 07:43:04 +08:00
Compare commits
2 Commits
dc9718a0d4
...
aec7f1d261
Author | SHA1 | Date | |
---|---|---|---|
|
aec7f1d261 | ||
|
f4a2006e60 |
@ -80,8 +80,10 @@ export default class LinkedList {
|
||||
this.tail.next = newNode;
|
||||
this.tail = newNode;
|
||||
} else {
|
||||
this.head = newNode;
|
||||
this.tail = newNode;
|
||||
// this.head = newNode;
|
||||
// this.tail = newNode;
|
||||
newNode.next = this.head;
|
||||
newNode = this.head;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user