Driver code
int main ( ) { int row = 4 , column = 4 ; int matrix [ 4 ] [ 4 ] = { { 1 , 1 , 1 , 1 } , { 1 , 0 , 0 , 0 } , { 1 , 0 , 0 , 0 } , { 1 , 0 , 0 , 0 } } ; int k = 6 ; int ans = maxLengthSquare ( row , column , matrix , k ) ; cout << ans ; return 0 ; }