Merge pull request #2319 from huawuque404/master

Error changing Java code
This commit is contained in:
程序员Carl 2023-11-02 10:00:27 +08:00 committed by GitHub
commit 6973f61882
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}