Set Matrix Zeroes
Medium · Arrays & Strings · about 20 minutes
Asked at Meta, Bloomberg, Amazon, Microsoft, Google.
Wherever the grid holds a 0, wipe out that cell's whole row and whole column (overwrite them with 0). Modify the matrix in place and return it.