Level Order Traversal || Trees || c++
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        if(root==NULL)return { };\n        int max=INT_MIN,max1=0;\n        int sum=0,count=1;\n        vector<pair<int,int>>v;\n        queue<TreeNode*>pq;\n        pq.push(root);\n        while(!pq.empty()){\n            int n=pq.size();\n            sum=0;\n          //  count++;\n            for(int i=0;i<n;i++){\n               TreeNode* root1=pq.front();\n                pq.pop();\n                if(root1->left!=NULL)\n                {\n                   pq.push(root1->left);\n                }\n                if(root1->right!=NULL)\n                {\n                      pq.push(root1->right);\n                }\n                sum+=root1->val;\n            }\n             if(sum>max)\n                {\n                    max=sum;\n                    max1=count;\n                }\n                count++;\n        }\n        return max1;\n       \n        \n    }\n};\n```
['C++']