you give binary matrix matrix size m x n allow rearrange column matrix orderreturn area large submatrix matrix element submatrix 1 reorder column optimally example 1input matrix 001111101output 4explanation you rearrange column show abovethe large submatrix 1s bold area 4example 2input matrix 10101output 3explanation you rearrange column show abovethe large submatrix 1s bold area 3example 3input matrix 110101output 2explanation Notice rearrange entire column way submatrix 1s large area 2 Constraintsm matrixlengthn matrixilength1 m n 105matrixij 0 1