Fix the util of array to tree.

This commit is contained in:
Yudong Jin
2022-12-02 00:53:19 +08:00
parent e20bc251f5
commit d85a14521f
3 changed files with 5 additions and 2 deletions

View File

@ -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()