Driver code
let row = 4 , column = 4 ; let matrix = [ [ 1 , 1 , 1 , 1 ] , [ 1 , 0 , 0 , 0 ] , [ 1 , 0 , 0 , 0 ] , [ 1 , 0 , 0 , 0 ] ] ; let k = 6 ; let ans = maxLengthSquare ( row , column , matrix , k ) ; document . write ( ans ) ;