diff --git a/src/chapter06trees/FindLevelwithMaxSum.java b/src/chapter06trees/FindLevelwithMaxSum.java index 3214a52..1953bcf 100644 --- a/src/chapter06trees/FindLevelwithMaxSum.java +++ b/src/chapter06trees/FindLevelwithMaxSum.java @@ -19,7 +19,7 @@ public class FindLevelwithMaxSum { public int findLevelwithMaxSum(BinaryTreeNode root) { - int maxSum = 0, currentSum = 0; + int maxSum = Integer.MIN_VALUE, currentSum = 0; if (root == null) return 0; // Initialization