This commit is contained in:
krahets
2024-04-29 15:19:01 +08:00
parent f748af6aa4
commit 1b29b658bf
6 changed files with 39 additions and 39 deletions
@@ -173,7 +173,7 @@ comments: true
"""串列容量"""
return len(self._tree)
def val(self, i: int) -> int:
def val(self, i: int) -> int | None:
"""獲取索引為 i 節點的值"""
# 若索引越界,則返回 None ,代表空位
if i < 0 or i >= self.size():