反转链表
ListNode *reverse(ListNode *head){ if (!head || !head->next) return head; auto res = reverse(head->next); head->next->next = head; head->next = nullptr; return res; }
ListNode *reverse(ListNode *head){ if (!head || !head->next) return head; auto res = reverse(head->next); head->next->next = head; head->next = nullptr; return res; }
