题目:
![](https://img-blog.csdnimg.cn/direct/eb521e309adf410fa187a984de3cf3c2.png)
题解:
Go
func reverseList(head *ListNode) *ListNode {
if head == nil || head.Next == nil {
return head
}
newHead := reverseList(head.Next)
head.Next.Next = head
head.Next = nil
return newHead
}