mirror of
https://github.com/krahets/hello-algo.git
synced 2026-02-04 11:23:55 +08:00
Simplify the declarations of the Python code.
This commit is contained in:
@@ -22,7 +22,7 @@ def list_to_tree(arr: list[int]) -> TreeNode | None:
|
||||
if not arr:
|
||||
return None
|
||||
|
||||
i: int = 0
|
||||
i = 0
|
||||
root = TreeNode(arr[0])
|
||||
queue: deque[TreeNode] = deque([root])
|
||||
while queue:
|
||||
|
||||
Reference in New Issue
Block a user