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;