Update 0019.删除链表的倒数第N个节点.md

This commit is contained in:
Flow-sandyu
2022-09-27 21:01:31 +08:00
committed by GitHub
parent 28460715b6
commit 87c505371d

View File

@ -91,10 +91,6 @@ public ListNode removeNthFromEnd(ListNode head, int n){
ListNode dummyNode = new ListNode(0);
dummyNode.next = head;
//排除示例 2 的情况head = [1], n = 1
if (head == null)
return null;
ListNode fastIndex = dummyNode;
ListNode slowIndex = dummyNode;