Skip to content

Commit df120cd

Browse files
committed
Time: 214 ms (67.30%), Space: 107.9 MB (47.75%) - LeetHub
1 parent 6788e03 commit df120cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

1373-maximum-sum-bst-in-binary-tree/1373-maximum-sum-bst-in-binary-tree.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class Solution {
4444
else
4545
{
4646
i.isBST= false;
47-
i.maxsum = max(left.maxsum,right.maxsum);
47+
i.maxsum = 0;
4848
}
4949
ans = max(ans,i.maxsum);
5050
return i;

0 commit comments

Comments
 (0)