Linklist
Basic link list implemention
function ListNode(val, next) { this.val = val === undefined ? 0 : val; this.next = next === undefined ? null : next;}
how to make a new node
let main = new ListNode();
how to make a new next node
let final = new ListNode();main.next = final;
do remember to make main to main.next
main = main.next;