Skip to content

Commit d131731

Browse files
authored
Update 0404.左叶子之和.md
勘误python注释
1 parent 5e5b3d5 commit d131731

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

problems/0404.左叶子之和.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ if (node->left != NULL && node->left->left == NULL && node->left->right == NULL)
4242

4343
## 递归法
4444

45-
递归的遍历顺序为后序遍历(左右中),是因为要通过递归函数的返回值来累加求取左叶子数值之和。(前序遍历其实也同样AC)
45+
递归的遍历顺序为后序遍历(左右中),是因为要通过递归函数的返回值来累加求取左叶子数值之和。
4646

4747
递归三部曲:
4848

@@ -230,7 +230,7 @@ class Solution {
230230

231231
## Python
232232

233-
> 递归后序遍历
233+
**递归后序遍历**
234234
```python3
235235
class Solution:
236236
def sumOfLeftLeaves(self, root: TreeNode) -> int:
@@ -247,7 +247,7 @@ class Solution:
247247
return cur_left_leaf_val + left_left_leaves_sum + right_left_leaves_sum #
248248
```
249249

250-
> 迭代
250+
**迭代**
251251
```python3
252252
class Solution:
253253
def sumOfLeftLeaves(self, root: TreeNode) -> int:

0 commit comments

Comments
 (0)