//反转单向链表
public void ReverseLinkedList(Node head){
Node pre=null;
Node next=null;
while(head!=null){
next=head.next;
head.next=pre;
pre=head;
head=next;
}
return head;
}
链表-反转单向链表
猜你喜欢
转载自blog.csdn.net/weixin_42146769/article/details/88374996
今日推荐
周排行