• + 0 comments

    javascript solution:

    ` function reverse(llist) { let prev, next = null;

    while (llist !== null) {
        [next, llist.next] = [llist.next, prev];
        [prev, llist] = [llist, next];
    }
    
    return prev;
    

    } `