Given a binary matrix filled with 0s and 1s, find the largest rectangle containing only 1s and return its area. Input: JSON 2D grid of 0/1.
Input: A JSON 2D 0/1 grid.
Output: Integer — maximum rectangle area.
Input: [[1,0,1,0,0],[1,0,1,1,1],[1,1,1,1,1],[1,0,0,1,0]]
Output: 6
Explanation: Largest all-ones rectangle has area 6.Input: [[1]]
Output: 1
Explanation: Single cell.Input: [[0]]
Output: 0
Explanation: No ones.1<=m,n<=200grid[i][j] in {0,1}