Compare commits

...

2 Commits

Author SHA1 Message Date
vrutikjadav
aec7f1d261
Merge f4a2006e60 into 2c67b48c21 2024-03-09 16:08:15 -07:00
vrutikjadav
f4a2006e60 #1020 updating insert at Head part 2024-01-23 12:06:36 +05:30

View File

@ -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;
}
}
}