simple and easy C++ solution || BSF
if it\'s help, please up \u2B06 vote! \u2764\uFE0F\n###### Let\'s Connect on Linkedin: www.linkedin.com/in/shishirrsiam\n\n\n\n# Code\ncpp []\nclass Solution {\
# if it\'s help, please up \u2B06 vote! \u2764\uFE0F\n###### Let\'s Connect on Linkedin: www.linkedin.com/in/shishirrsiam\n\n\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    int maxLevelSum(TreeNode* root) \n    {\n        queue<TreeNode*>q;\n        q.push(root);\n        int ans = 1, depth = 1, size, maxSum = root->val, sum;\n        while(!q.empty())\n        {\n            sum = 0, size = q.size();\n            while(size--)\n            {\n                auto node = q.front(); q.pop();\n                sum += node->val;\n                if(node->left) q.push(node->left);\n                if(node->right) q.push(node->right);\n            }\n            if(sum > maxSum)\n            {\n                maxSum = sum;\n                ans = depth;\n            }\n            depth += 1;\n        }\n        return ans;\n    }\n};\n```
['Tree', 'Depth-First Search', 'Breadth-First Search', 'Binary Tree', 'C++']