slow最终指向即为中点
ListNode fast=head;
ListNode slow=head;
while(fast.next!=null&&fast.next.next!=null)
{
slow=slow.next;
fast=fast.next.next;
}
slow最终指向即为中点
ListNode fast=head;
ListNode slow=head;
while(fast.next!=null&&fast.next.next!=null)
{
slow=slow.next;
fast=fast.next.next;
}