Python BFS Solution
py\n# Definition for a binary tree node.\n# class TreeNode:\n#     def __init__(self, x):\n#         self.val = x\n#         self.left = None\n#         self.ri
```py\n# Definition for a binary tree node.\n# class TreeNode:\n#     def __init__(self, x):\n#         self.val = x\n#         self.left = None\n#         self.right = None\n\nclass Solution:\n    def maxLevelSum(self, root: TreeNode) -> int:\n        level = 0\n        max_level = 0\n        max_sum = float(\'-inf\')\n        \n        q = collections.deque()\n        q.append(root)\n        \n        while q:\n            level += 1\n            curr_sum = 0\n            \n            for _ in range(len(q)):\n                node = q.popleft()\n                \n                curr_sum += node.val\n                \n                if node.left:\n                    q.append(node.left)\n                    \n                if node.right:\n                    q.append(node.right)\n                    \n            if max_sum < curr_sum:\n                max_sum = curr_sum\n                max_level = level\n                \n        return max_level\n```    \n
['Breadth-First Search', 'Python3']