package leetcode;

/**
 * https://leetcode.com/problems/maximum-level-sum-of-a-binary-tree/
 */
public class Problem1161 {
    public static class TreeNode {
        int val;
        TreeNode left;
        TreeNode right;

        TreeNode(int x) {
            val = x;
        }
    }

    public int maxLevelSum(TreeNode root) {
        // TODO
        return 0;
    }

    public static void main(String[] args) {

    }
}

@@ -410,16 +410,573 @@
 args) %7B%0A
+        Problem1161 prob = new Problem1161();%0A%0A        TreeNode root = new TreeNode(1);%0A        root.left = new TreeNode(7);%0A        root.right = new TreeNode(0);%0A        root.left.left = new TreeNode(7);%0A        root.left.right = new TreeNode(-8);%0A        System.out.println(prob.maxLevelSum(root)); // 2%0A%0A        root = new TreeNode(1);%0A        root.left = new TreeNode(7);%0A        root.right = new TreeNode(0);%0A        root.left.left = new TreeNode(7);%0A        root.left.right = new TreeNode(100);%0A        System.out.println(prob.maxLevelSum(root)); // 3
 %0A    %7D%0A%7D

Update problem 1161