give m x n integer matrix matrix element 0 set entire row column 0syou place example 1input matrix 111101111output 101000101example 2input matrix 012034521315output 000004500310 Constraintsm matrixlengthn matrix0length1 m n 200231 matrixij 231 1 Follow upa straightforward solution Omn space probably bad ideaa simple improvement use Om n space well solutioncould devise constant space solution