链表逆序
private void ListResverse(ListNode head)
{
ListNode cur,next;
if(head == null||head.next == null)
return;
cur = head.next;
while(cur.next!=null)
{
next = cur.next;
cur.next = next.next;
next.next = cur;
head.next = next;
}
}
浙公网安备 33010602011771号