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. I need to try

Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing only 1's and return its area.

61. Given a 2D binary matrix filled with 0's and 1's, find

I need to try and solve this problem using c++, but I have some problematic restrictions. I am ONLY allowed to use the iostream package, and I am NOT allowed to use vectors, bit manipulation, commands that uses a period, and I am not allowed to create or use any functions. I am ONLY allowed to use the c++ basics (variable creation, basic math, cout and cin, comparative expressions, etc), if statements, loops, and arrays/matrices.

is something like this even possible?
 

61. Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing only 1's and return its area. A. Example: i. Input: [ [1, 0, 1, 0, 0], [1.0, 1, 1, 1], [1, 1, 1, 1, 1], [1, 0, 0, 1, 0] ] ii. Output: 6

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!