var reverseList = function(head) {if (head == null || head.next == null) return head;let last = reverseList(head.next);head.next.next = head;head.next = null;return last;};function reverse(head) {let prev = null, cur = head, nxt = head;while (cur != null) {nxt = cur.next;cur.next = prev;prev = cur;cur = nxt;}return prev;}
