diff --git a/problems/0707.设计链表.md b/problems/0707.设计链表.md index 86f3a683..c5a55574 100644 --- a/problems/0707.设计链表.md +++ b/problems/0707.设计链表.md @@ -973,6 +973,9 @@ class MyLinkedList { // 处理头节点 if (index === 0) { this.head = this.head!.next; + if (index === this.size - 1) { + this.tail = null + } this.size--; return; }