One of the most frequently asked coding interview questions on 2 D Array in companies like Google, Facebook, Amazon, LinkedIn, Microsoft, Uber, Apple, Adobe etc.
LeetCode : Maximal Rectangle
Problem URL - https://leetcode.com/problems/maximal-rectangle/
Question :Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing only 1's and return its area.
Example:
Input:
[
["1","0","1","0","0"],
["1","0","1","1","1"],
["1","1","1","1","1"],
["1","0","0","1","0"]
]
Output: 6
Connect with me on LinkedIn at: https://www.linkedin.com/in/jayati-tiwari/