Set Matrix Zeroes
Medium📝 Description
If element is 0, set entire row and column to 0 (in-place)
Input Format
2D matrix
Output Format
Modified matrix
Constraints
m == matrix.length
🔍 Sample Input
[[1,1,1],[1,0,1],[1,1,1]]
✅ Sample Output
[[1,0,1],[0,0,0],[1,0,1]]
Code Editor
Please login to run and submit code.
Results
Suggested Solution
Shortcuts: Ctrl+Enter to submit, Ctrl+Shift+R to run