We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5e5b3d5 commit d131731Copy full SHA for d131731
problems/0404.左叶子之和.md
@@ -42,7 +42,7 @@ if (node->left != NULL && node->left->left == NULL && node->left->right == NULL)
42
43
## 递归法
44
45
-递归的遍历顺序为后序遍历(左右中),是因为要通过递归函数的返回值来累加求取左叶子数值之和。(前序遍历其实也同样AC)
+递归的遍历顺序为后序遍历(左右中),是因为要通过递归函数的返回值来累加求取左叶子数值之和。。
46
47
递归三部曲:
48
@@ -230,7 +230,7 @@ class Solution {
230
231
## Python
232
233
-> 递归后序遍历
+**递归后序遍历**
234
```python3
235
class Solution:
236
def sumOfLeftLeaves(self, root: TreeNode) -> int:
@@ -247,7 +247,7 @@ class Solution:
247
return cur_left_leaf_val + left_left_leaves_sum + right_left_leaves_sum # 中
248
```
249
250
-> 迭代
+**迭代**
251
252
253
0 commit comments