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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 4 deletions

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;