Zero Out Rows and Columns of a Matrix

Company: Tekion

Difficulty: easy

Problem Statement

Zero Out Rows and Columns of a Matrix You are given an `m x n` integer matrix `matrix`. Whenever an element of the original matrix equals `0`, every element of that element's row and every element of that element's column must become `0`. Apply this rule to the whole matrix and report the resulting matrix. The rule is decided entirely from the **original** matrix: a cell that only becomes `0` as a result of the rule does not itself cause its own row and column to be cleared. The intended solution modifies the matrix in place and uses only a constant amount of extra space beyond the matrix itself. Input Format Line 1: two space-separated integers `m` and `n`, the number of rows and columns. Each of the next `m` lines: `n` space-separated integers, one row of `matrix`. Output Format Print `m` lines. Line `i` holds the `n` space-separated integers of row `i` of the transformed matrix. Constraints `m == len(matrix)` `n == len(matrix[0])` `1 <= m, n <= 35` `-2147483648 <=