Open weiren1998 opened 2 years ago
https://weiren1998.github.io/archives/8c04a153.html
题目:
编写一种算法,若M × N矩阵中某个元素为0,则将其所在的行与列清零。 123456789101112131415161718192021222324252627# 样例1输入:[ [1,1,1], [1,0,1], [1,1,1]]输出:[ [1,0,1], [0,0,0], [1,0,1]] # 样例2输入:[ [0,1,2,0], [3,4,5,2],
https://weiren1998.github.io/archives/8c04a153.html
题目:
编写一种算法,若M × N矩阵中某个元素为0,则将其所在的行与列清零。 123456789101112131415161718192021222324252627# 样例1输入:[ [1,1,1], [1,0,1], [1,1,1]]输出:[ [1,0,1], [0,0,0], [1,0,1]] # 样例2输入:[ [0,1,2,0], [3,4,5,2],