Skip to content

Commit 376755f

Browse files
committed
1
1 parent d7924a0 commit 376755f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

SumRoottoLeafNumbers/SumRoottoLeafNumbers.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ class Solution {
1818

1919
}
2020
void dfs(TreeNode *node, int val, int& sum) {
21-
if (node == NULL) {
22-
return;
23-
}
21+
if (node == NULL) return;
2422

2523
val *= 10;
2624
val += node->val;
@@ -37,4 +35,4 @@ class Solution {
3735
dfs(node->right, val, sum);
3836
}
3937
}
40-
};
38+
};

0 commit comments

Comments
 (0)