mirror of
https://github.com/krahets/hello-algo.git
synced 2025-11-02 12:58:42 +08:00
Bug fixes and improvements (#1627)
* Update Copyright 2024 to 2025. * Fix the flex of .profile-cell for mobile devices. * Update performance_evaluation.md * 抛出 -> 给出 * Sync zh and zh-hant version. * Improve the landing page of the English version. * Bug fixes * Fix readme-typing-svg * Update readme-typing-svg * Bug fixes * sync zh and zh-hant versions.
This commit is contained in:
@ -69,7 +69,7 @@ class LinkedListDeque:
|
||||
val: int = self._front.val # 暫存頭節點值
|
||||
# 刪除頭節點
|
||||
fnext: ListNode | None = self._front.next
|
||||
if fnext != None:
|
||||
if fnext is not None:
|
||||
fnext.prev = None
|
||||
self._front.next = None
|
||||
self._front = fnext # 更新頭節點
|
||||
@ -78,7 +78,7 @@ class LinkedListDeque:
|
||||
val: int = self._rear.val # 暫存尾節點值
|
||||
# 刪除尾節點
|
||||
rprev: ListNode | None = self._rear.prev
|
||||
if rprev != None:
|
||||
if rprev is not None:
|
||||
rprev.next = None
|
||||
self._rear.prev = None
|
||||
self._rear = rprev # 更新尾節點
|
||||
|
||||
Reference in New Issue
Block a user