SIMPLE SORT, beats 100% easy sorting solution
`\nclass Solution {\npublic:\n    int maxArea(vector<vector<int>> mat,int R,int C) \n{ \n   \n    vector<vector<int>> hist(R,vector<int> (C,0));\n  \n    for (i
````\nclass Solution {\npublic:\n    int maxArea(vector<vector<int>> mat,int R,int C) \n{ \n   \n    vector<vector<int>> hist(R,vector<int> (C,0));\n  \n    for (int i = 0; i < C; i++) { \n   \n        hist[0][i] = mat[0][i]; \n  \n    \n        for (int j = 1; j < R; j++) \n            hist[j][i] = (mat[j][i] == 0) ? 0 : hist[j - 1][i] + 1; \n    } \n        \n        for(int i=0;i<R;i++)\n        {\n            sort(hist[i].rbegin(),hist[i].rend());\n        }\n  \n\n  \n\n    int curr_area, max_area = 0; \n    for (int i = 0; i < R; i++) { \n        for (int j = 0; j < C; j++) { \n           \n            curr_area = (j + 1) * hist[i][j]; \n            if (curr_area > max_area) \n                max_area = curr_area; \n        } \n    } \n    return max_area; \n} \n    int largestSubmatrix(vector<vector<int>>& matrix) {\n        int n=matrix.size();\n        int m=matrix[0].size();\n        \n        return maxArea(matrix,n,m);\n        \n        \n        \n    }\n};\n```
[]