mirror of
https://github.com/krahets/hello-algo.git
synced 2025-07-22 15:53:50 +08:00
Fix the util of array to tree.
This commit is contained in:
@ -24,7 +24,7 @@ def list_to_tree(arr):
|
||||
[type]: [description]
|
||||
"""
|
||||
if not arr:
|
||||
return
|
||||
return None
|
||||
i = 1
|
||||
root = TreeNode(int(arr[0]))
|
||||
queue = collections.deque()
|
||||
|
Reference in New Issue
Block a user