[Python3] Concise solution
Intuition\n\nFor each row, find the histogram height of each column. \nSort it and find the max rectangle you could find(refer to Question 84).\n\n# Complexity\
# **Intuition**\n\nFor each row, find the histogram height of each column. \nSort it and find the max rectangle you could find(refer to [Question 84]( https://leetcode.com/problems/largest-rectangle-in-histogram/)).\n<br/>\n# **Complexity**\nTime: `O(m * n * log(n))`\nSpace: `O(n)`\n<br/>\n# **Python3**\n```python\ndef largestSubmatrix(self, A: List[List[int]]) -> int:\n\tm, n = len(A), len(A[0])\n\tH = [0] * n\n\tans = 0\n\tfor i in range(m):\n\t\tfor j in range(n):\n\t\t\tH[j] = H[j] + 1 if A[i][j] else 0\n\t\tans = max(ans, self.getMaxArea(H[:]))\n\treturn ans\n    \ndef getMaxArea(self, heights):\n\theights.sort()\n\tarea = 0\n\tn = len(heights)\n\tfor i in range(n):\n\t\th = heights[i]\n\t\tarea = max(area, h * (n - i))\n\treturn area\n\n```\n\n\n
[]