public static ListNode ReverseList(ListNode head) { ListNode a=head,b=a.next,c; a.next=null;//head节点的next指针反向指空 while(b!=null){ c=b.next; b.next=a; a=b; b=c; } return a; }