Category: matrix
-
LeetCode 73: Set Matrix Zeroes
link We cannot update the matrix in one pass. Because, the original zeroes will conflict with the filled-in zeroes. We need at least two passes. Time cannot be better than . We shall optimize for space. O(m+n) space In the first pass, for each encountered zero, we shall record its row and its column in…