Node slow = list.head,fast = list.head;
Node last = null;
while (fast != list.head && fast.next != list.head) {
if (fast.next.next == list.head) last=fast.next;
fast = fast.next.next;
slow = slow.next;
}
if (fast.next == list.head)
fast.next = slow.next;
else
last.next = slow.next;
list.head2 = slow.next;
slow.next = list.head;
list.head1 = list.head;
在第 14 行得到 null 错误
其他部分 谁能帮我写代码?