mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-11 23:16:07 +00:00
build
This commit is contained in:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user