Set Matrix Zeroes
Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in-place.
(设置矩阵整行&列为0)
Example:
1. 遍历矩阵,集合维护“0”的行列号
1 | class Solution: |
Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in-place.
(设置矩阵整行&列为0)
Example:
1 | class Solution: |