Skip to content

Vermouth1995/MatrixSetZero

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

MatrixSetZero

Description:
实现一个函数,传入参数为一个矩阵(int型二维数组),将其中为0的行与列都置为0后返回。要求空间复杂度为O(1)

input:

1 0 2 3 1
2 3 0 1 1
2 1 1 2 4
3 0 1 1 1

output:

0 0 0 0 0
0 0 0 0 0
2 0 0 2 4
0 0 0 0 0

Releases

No releases published

Packages

No packages published