Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: trekhleb/javascript-algorithms
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: vrutikjadav/javascript-algorithms
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: vrutikjadav-#1016
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Jan 23, 2024

  1. Copy the full SHA
    f4a2006 View commit details
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/data-structures/linked-list/LinkedList.js
6 changes: 4 additions & 2 deletions src/data-structures/linked-list/LinkedList.js
Original file line number Diff line number Diff line change
@@ -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;
}
}
}