MCPcopy Create free account
hub / github.com/LjyYano/LeetCode / L0073_SetMatrixZeroes

Class L0073_SetMatrixZeroes

src/main/java/L0073_SetMatrixZeroes.java:25–126  ·  view source on GitHub ↗

https://leetcode.cn/problems/set-matrix-zeroes/ 给定一个 m x n 的矩阵,如果一个元素为 0 ,则将其所在行和列的所有元素都设为 0 。请使用 原地 算法。 示例 1: 输入:matrix = [[1,1,1],[1,0,1],[1,1,1]] 输出:[[1,0,1],[0,0,0],[1,0,1]] 示例 2: 输入:matrix = [[0,1,2,0],[3,4,5,2],[1,3,1,5]] 输出:[[0,0,0,0],[0,4,5,0],[0,3,1,0]] 提示: m == matrix.length n == matri

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected