Skip to content

Commit 812ecd2

Browse files
committed
Runtime: 13 ms (Top 6.52%) | Memory: 9.2 MB (Top 47.28%)
1 parent 7d2dd72 commit 812ecd2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/algorithms/S/Sum Root to Leaf Numbers/Sum Root to Leaf Numbers.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Runtime: 13 ms (Top 6.52%) | Memory: 9.2 MB (Top 47.28%)
12
class Solution {
23
public:
34
int ans=0;
@@ -12,12 +13,12 @@ class Solution {
1213
if(root->left) dfs(root->left,s);
1314
if(root->right) dfs(root->right,s);
1415
s=o;
15-
16+
1617
}
1718
int sumNumbers(TreeNode* root) {
1819
if(!root) return ans;
1920
string s = "";
2021
dfs(root,s);
2122
return ans;
2223
}
23-
};
24+
};

0 commit comments

Comments
 (0)