Skip to content

Instantly share code, notes, and snippets.

View dhavaljardosh's full-sized avatar
🚧
Work in Progress

Dhaval Jardosh dhavaljardosh

🚧
Work in Progress
View GitHub Profile
@dhavaljardosh
dhavaljardosh / Reverse a Linked List.js
Created October 2, 2017 12:25
Reverse a Linked List created by dhavaljardosh1 - https://repl.it/Lvv8/0
class LinkedList{
constructor(){
this.head = null;
this.length=0;
}
add(value){
var node = new Node(value);
if(this.head==null){
this.head = node;