C++ using 2 traversals by Sorting
\nclass Solution {\npublic:\n    int largestSubmatrix(vector<vector<int>>& mat) {\n        int m= mat.size();\n        int n= mat[0].size();\n        for(int i=
```\nclass Solution {\npublic:\n    int largestSubmatrix(vector<vector<int>>& mat) {\n        int m= mat.size();\n        int n= mat[0].size();\n        for(int i=1; i<m ; i++){\n            for(int j=0; j<n; j++){\n                if(mat[i][j]!=0)\n                    mat[i][j]+=  mat[i-1][j];\n            }\n        }\n        int ans=0;\n        for(int i=0; i<m; i++){\n            sort(mat[i].begin(), mat[i].end(), greater<int>());\n            for(int j=0; j<n; j++){\n                ans= max(ans, mat[i][j]*(j+1));\n            }\n        }\n        return ans;\n    }\n};\n```
['C']