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;
}
}
原文:http://www.cnblogs.com/binglangwu/p/6827770.html