Skip to main content
Set Matrix Zeroes | AlgoCracked
AlgoCracked
ProblemsSet Matrix Zeroes
Medium54.0% acceptance
ArrayHash TableMatrix

Set Matrix Zeroes

Given an m x n integer matrix, if any cell holds 0 , set that cell's entire row and entire column to 0 . Do it in place . Input format The input is a single argument [matrix] , a JSON 2-D array, e.g. [[[1,1,1],[1,0,1],[1,1,1]]] . The graded answer is the matrix after your method mutates it; any value your method returns is ignored.

Loading workspace…