Easy to understand || C++ ||Queue
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\n/**\n * Definition for a binary tree node.\n * struct TreeNode {\n *     int val;\n *     TreeNode *left;\n *     TreeNode *right;\n *     TreeNode() : val(0), left(nullptr), right(nullptr) {}\n *     TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}\n *     TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right) {}\n * };\n */\nclass Solution {\npublic:\n    int maxLevelSum(TreeNode* root) {\n      queue<TreeNode*>q;\n        q.push(root);\n        int maxi=INT_MIN,l=0,ans;\n        while(!q.empty()){\n            int size=q.size();\n            int sum=0;\n            for(int i=0;i<size;i++){\n                TreeNode *node=q.front();\n                sum+=node->val;\n                q.pop();\n                if(node->left!=NULL) q.push(node->left);\n                if(node->right!=NULL) q.push(node->right);\n            }\n            if(sum>maxi){\n                maxi=sum;\n                ans=l;\n            }\n            l++;\n        }\n        return ans+1; }\n};\n```
['Tree', 'Queue', 'C++']