Largest Square Sub-matrix With All 1's

1. You are given a matrix of 0's and 1's.
2. You have to find the maximum size square sub-matrix with all 1's.
Input Format
A number N, which represents number of rows in matrix
A number M, which represents number of columns in matrix
arr1
arr2...N*M numbers
Output Format
Check the sample output and question video.
Question Video
Constraints
1 <= N,M <= 100
0<= arr[i][j] <= 1
Sample Input
5 6
0 1 0 1 0 1
1 0 1 0 1 0
0 1 1 1 1 0
0 0 1 1 1 0
1 1 1 1 1 1
Sample Output
3


  • Asked in Companies
  • Related Topics






Video Solution

Code Solution

Run
 
Run
Id Name