Easy C++ || O(m*n) solution
Intuition\n Describe your first thoughts on how to solve this problem. \nThis is similar problem to Largest Rectangle in Histogram. We just need to find height 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nThis is similar problem to Largest Rectangle in Histogram. We just need to find height of every column through every row taking every row as base.\n# Approach\n<!-- Describe your approach to solving the problem. -->\nThe hight of every column in $$0th$$ row is same as given. Iterating through row 1 to m-1 if at matrix[row][column] is not zero then the height of the column is just 1 + height of same column at $$row - 1$$.\nNow after counting every height we can move on finding the maximum area. We iterate through $$row$$ m - 1 to 0 and sorting every row in descending order therefore the area can be found by just doing $$area$$ = (matrix[row][column] * (column+1)). The max Area is area is stored in $$maxArea$$ and it can be found out by taking maximum of $$maxArea$$ and $$area$$\n# Complexity\n- Time complexity: $$O(m*n)$$\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: $$O(1)$$\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int largestSubmatrix(vector<vector<int>>& matrix) {\n        int m = matrix.size();\n        int n = matrix[0].size();\n\n        for(int i = 1; i < m; i++){\n            for(int j = 0; j < n; j++){\n                if(matrix[i][j] != 0){\n                    matrix[i][j] = matrix[i-1][j] + 1;\n                }\n                else{\n                    matrix[i][j] = 0;\n                }\n            }\n        }\n        int maxArea = 0;\n        for(int i = m-1; i >= 0; i--){\n            sort(matrix[i].begin(), matrix[i].end(), greater<int>());\n            int area = 0;\n            for(int j = 0; j < n; j++){\n                area = (matrix[i][j] * (j+1));\n                maxArea = max(maxArea, area);\n            }\n        }\n\n        return maxArea;\n    }\n};\n```
['C++']