From 2b56a2277f8f32ae5e4082a27edf8c5ac6c324df Mon Sep 17 00:00:00 2001 From: CyC2018 Date: Fri, 23 Oct 2026 04:39:44 +0800 Subject: [PATCH] =?UTF-8?q?Update=2018.1=20=E5=9C=A8=20O(1)=20=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E5=86=85=E5=88=A0=E9=99=A4=E9=93=BE=E8=A1=A8=E8=8A=82?= =?UTF-8?q?=E7=82=B9.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- notes/18.1 在 O(1) 时间内删除链表节点.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notes/18.1 在 O(1) 时间内删除链表节点.md b/notes/18.1 在 O(1) 时间内删除链表节点.md index 365e18d4..44c63e70 100644 --- a/notes/18.1 在 O(1) 时间内删除链表节点.md +++ b/notes/18.1 在 O(1) 时间内删除链表节点.md @@ -15,7 +15,7 @@ ```java public ListNode deleteNode(ListNode head, ListNode tobeDelete) { if (head == null || tobeDelete == null) - return null; + return head; if (tobeDelete.next != null) { // 要删除的节点不是尾节点 ListNode next = tobeDelete.next;