Set Matrix Zeroes
Asked at Navan · Coding Questions · Difficulty: Medium · Last asked Jul 15, 2026
Given a m x n integer matrix matrix, if an element is 0, set its entire row and column to 0. Do this in-place. You must use O(1) extra space. Example: Input: matrix = [[1,1,1],[1,0,1],[1,1,1]] Output: [[1,0,1],[0,0,0],[1,0,1]]
Loading the problem…