Update 18.1 在 O(1) 时间内删除链表节点.md

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
CyC2018
2026-10-23 04:39:44 +08:00
co-authored by Claude Fable 5
parent e959de0364
commit 2b56a2277f
@@ -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;