Maximum size square sub-matrix with all 1s
Question: Given a matrix consisting only 0s and 1s, find the maximum size square sub-matrix with all 1s.
Example: Consider the below matrix.
0 1 1 0 1 1 1 0 1 0 0 1 1 1 0 1 1 1 1 0 1 1 1 1 1 0 0 0 0 0 The maximum square sub-matrix with all ‘1’ bits is from (2,1) to (4,3)
1 1 1 1 1 1 1 1 1 Answer:
[Read More]