From 28d50d34c69714bbd11453451fc3fb7dedaad369 Mon Sep 17 00:00:00 2001 From: huawuque404 Date: Thu, 26 Oct 2023 19:15:25 +0800 Subject: [PATCH] Error changing Java code --- problems/0019.删除链表的倒数第N个节点.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/problems/0019.删除链表的倒数第N个节点.md b/problems/0019.删除链表的倒数第N个节点.md index dbd053d1..28bb61ee 100644 --- a/problems/0019.删除链表的倒数第N个节点.md +++ b/problems/0019.删除链表的倒数第N个节点.md @@ -110,7 +110,7 @@ public ListNode removeNthFromEnd(ListNode head, int n){ fastIndex = fastIndex.next; } - while (fastIndex.next != null){ + while (fastIndex != null){ fastIndex = fastIndex.next; slowIndex = slowIndex.next; }