Python solution: Largest Rectangular Area in a Rearrangable Histogram
\n    def largestSubmatrix(self, matrix: List[List[int]]) -> int:\n        def largestRectangleArea(heights):\n            heights.sort(reverse=True)\n         
```\n    def largestSubmatrix(self, matrix: List[List[int]]) -> int:\n        def largestRectangleArea(heights):\n            heights.sort(reverse=True)\n            res = heights[0]\n            for i in range(1, len(heights)):\n                res = max(res, heights[i] * (i + 1))\n            return res\n        \n        m, n = len(matrix), len(matrix[0])\n        max_area = 0\n        for i in range(m):\n            if i >= 1:\n                for j in range(n):\n                    if matrix[i][j] == 1:\n                        matrix[i][j] += matrix[i-1][j]\n            max_area = max(max_area, largestRectangleArea([x for x in matrix[i]]))\n        return max_area\n```
[]