Set Matrix Zeroes
Medium
Arrays
Matrix
Solve the Set Matrix Zeroes problem.
Input and output as shown in examples.
Constraints
See problem-specific constraints.
Examples
Example 1:
Input: 1 1 1
1 0 1
1 1 1
Output:
Example 2:
Input: 1 1 1
1 0 1
1 1 1
Output:
Hints
Think about the approach carefully.
Consider edge cases.
Tests:
Runtime:
Memory:
Test
Input:
Expected:
Got:
Click Run Code to test against sample cases, or Submit to test against all cases.
▲ Console