Cpp Solution
Approach\nLevel order traversal\n\n# Code\n\nclass Solution {\npublic:\n    int maxLevelSum(TreeNode* root) {\n        queue<TreeNode*> q;\n        vector<int> 
# Approach\nLevel order traversal\n\n# Code\n```\nclass Solution {\npublic:\n    int maxLevelSum(TreeNode* root) {\n        queue<TreeNode*> q;\n        vector<int> ans;\n        if(root != NULL){\n            q.push(root);\n        }\n        while(!q.empty()){\n            int sizee = q.size();\n            vector<int> p;\n            for(int i=0; i<sizee; i++){\n                TreeNode* node = q.front();\n                q.pop();\n                p.push_back(node->val);\n                if(node->left){\n                    q.push(node->left);\n                }\n                if(node->right){\n                    q.push(node->right);\n                }\n            }\n            int sum = accumulate(p.begin(), p.end(), 0);\n            ans.push_back(sum);\n        }\n        int maximum = *max_element(ans.begin(), ans.end());\n        int num = 0;\n        for(int i=0; i<ans.size(); i++){\n            if (ans[i] == maximum){\n                return i+1;\n            }\n        }\n        return 7; \n    }\n};\n```
['C++']