leetcode刷题36
今天刷的题是LeetCode第206题
class Solution { public ListNode reverseList(ListNode head) { return this.recursion(head,null); } public ListNode recursion(ListNode head,ListNode pre){ if (head==null){ return pre; } ListNode node=head.next; head.next=pre; return this.recursion(node,head); } }