Skip to content

Latest commit

 

History

History
11 lines (8 loc) · 360 Bytes

File metadata and controls

11 lines (8 loc) · 360 Bytes

Problem 3: Null Propagation (Set Matrix Zeroes)

Problem Statement

Given an m x n integer matrix matrix, if an element is 0, set its entire row and column to 0's. You must do it in-place.

Input Format

  • A 2D integer matrix matrix.

Example

Input: matrix = [[1, 1, 1], [1, 0, 1], [1, 1, 1]]
Output: [[1, 0, 1], [0, 0, 0], [1, 0, 1]]