Search
⌘K
Get Premium
Leetcode 73. Set Matrix Zeroes
Given an m×n matrix, set every row and column to zero wherever an element is zero, modifying the matrix in-place. The key challenge is to do this with constant extra space (not O(mn) or O(m+n)), e.g., by using the matrix itself to mark rows/columns to zero.
Asked at:
Microsoft
Meta
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Early December, 2025
Meta
Mid-level
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.
Early January, 2020
Microsoft
Mid-level
Set Matrix Zeroes
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.