Problem

(Largest block) Given a square matrix with elements 0 or 1 , write a program to find a max...

(Largest block) Given a square matrix with elements 0 or 1 , write a program to find a maximum square submatrix whose elements are all 1 s. Your program should prompt the user to enter the number of rows in the matrix and then the matrix and displays the location of the first element in the maximum square submatrix and the number of the rows in the submatrix. Assume the maximum number of rows is 100. Here is a sample run:

Your program should implement and use the following function to find the maximum square submatrix:

vector<int > findLargestBlock(const vectorint >>& m)

The return value is a vector that consists of three values. The first two values are the row and column indices for the first element in the submatrix and the third value is the number of the rows in the submatrix.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT