Sorting + expand consecutive 1s || Faster than 96% || O(n*m*m) || Clean Java Code
Complexity\n- Time complexity: O(nmm)\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# 
# Complexity\n- Time complexity: $$O(n*m*m)$$\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 {\n    public int largestSubmatrix(int[][] matrix) {\n        int maxArea = 0, n = matrix.length, m = matrix[0].length;\n        for (int i = n - 1; i >= 0; i--) {\n            for (int j = 0; j < m; j++) {\n                if (matrix[i][j] == 1) {\n                    matrix[i][j] += i + 1 >= n ? 0: matrix[i + 1][j];\n                }\n            }\n        }\n        for (int[] row : matrix) Arrays.sort(row);\n        for (int[] row : matrix) {\n            for (int j = 0; j < m; j++) {\n                if (row[j] > 0) {\n                    maxArea = Math.max(maxArea, row[j] * (m - j));\n                }\n            }\n        }\n        return maxArea;\n    }\n}\n```
['Sorting', 'Java']