Solved by using queue and level order traversal | 94.79% faster | simple to understand
```\nclass Solution {\npublic:\n    int maxLevelSum(TreeNode* root) {\n        if(root==NULL){return 1;}\n        queue q;\n        q.push(root);\n        int i
```\nclass Solution {\npublic:\n    int maxLevelSum(TreeNode* root) {\n        if(root==NULL){return 1;}\n        queue<TreeNode*> q;\n        q.push(root);\n        int ind=1;int s=INT_MIN,ans=1;\n        while(q.empty()==false){\n            int count=q.size();\n            int sum=0;\n            for(int i=0;i<count;i++){\n                TreeNode* curr=q.front();\n                q.pop();\n                sum+=curr->val;\n                if(curr->left){q.push(curr->left);}\n                if(curr->right){q.push(curr->right);}\n            }\n            if(sum>s){\n                s=sum;\n                ans=ind;\n            }\n            ind++;\n        }\n        return ans;\n    }\n    \n};
['Queue', 'C']