leetcode反转链表

1.递归法web public ListNode reverseList(ListNode head) { if(head==null||head.next==null) return head; ListNode p = reverseList(head.next); head.next.next=head; head.next=n
相关文章
相关标签/搜索