//递归链表反转
public static ListNode reverseList(ListNode head) {
if (head == null || head.next == null) {
return head;
}
ListNode newHead = reverseList(head.next);//倒数第二个节点
head.next.next = head;
head.next = null;
return newHead;
}
分析: