mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-11 13:00:22 +08:00
Update 0654.最大二叉树.md
This commit is contained in:
@ -292,7 +292,6 @@ class Solution:
|
||||
|
||||
```
|
||||
(版本二) 使用下标
|
||||
```python
|
||||
|
||||
class Solution:
|
||||
def traversal(self, nums: List[int], left: int, right: int) -> TreeNode:
|
||||
@ -311,9 +310,11 @@ class Solution:
|
||||
return self.traversal(nums, 0, len(nums))
|
||||
|
||||
|
||||
```python
|
||||
|
||||
(版本三) 使用切片
|
||||
|
||||
```python
|
||||
|
||||
class Solution:
|
||||
def constructMaximumBinaryTree(self, nums: List[int]) -> TreeNode:
|
||||
if not nums:
|
||||
|
Reference in New Issue
Block a user