$head = $list; // list 总得提前给得有吧,不然没法删 while($head->next != $p) { $head = $head->next; } $head->next = $head->next->next; 大致思路就是这样,边缘情况再判断下就好了
大致思路就是这样,边缘情况再判断下就好了