Skip to content

Commit

Permalink
Update 0654.最大二叉树.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jianghongcheng authored May 23, 2023
1 parent 41cf3a4 commit 7a544d9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion problems/0654.最大二叉树.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ class Solution:

```
(版本二) 使用下标
```python
class Solution:
def traversal(self, nums: List[int], left: int, right: int) -> TreeNode:
Expand All @@ -309,7 +310,7 @@ class Solution:
def constructMaximumBinaryTree(self, nums: List[int]) -> TreeNode:
return self.traversal(nums, 0, len(nums))
```

(版本三) 使用切片

Expand Down

0 comments on commit 7a544d9

Please sign in to comment.