Java Solution | Very Simple
\nclass Solution {\n\n    public int maxLevelSum(TreeNode root) {\n        Queue<TreeNode> q = new LinkedList<>();\n        q.add(root);\n        int level = 0;
```\nclass Solution {\n\n    public int maxLevelSum(TreeNode root) {\n        Queue<TreeNode> q = new LinkedList<>();\n        q.add(root);\n        int level = 0;\n        int currLevel = 0;\n        int maxSum = Integer.MIN_VALUE;\n        int currSum = 0;\n        while (!q.isEmpty()) {\n            int count = q.size();\n            currSum = 0;\n            for (int i = 0; i < count; i++) {\n                TreeNode curr = q.poll();\n                currSum += curr.val;\n                if (curr.left != null) q.add(curr.left);\n                if (curr.right != null) q.add(curr.right);\n            }\n            currLevel++;\n            level = maxSum >= currSum ? level : currLevel;\n            maxSum = Math.max(maxSum, currSum);\n        }\n        return level;\n    }\n}\n```
['Breadth-First Search', 'Queue', 'Java']