feat(content): more test cases
This commit is contained in:
@@ -9,6 +9,22 @@ categories:
|
||||
patterns:
|
||||
- matrix-traversal
|
||||
|
||||
function_signature: "def set_zeroes(matrix: list[list[int]]) -> None:"
|
||||
|
||||
test_cases:
|
||||
visible:
|
||||
- input: { matrix: [[1, 1, 1], [1, 0, 1], [1, 1, 1]] }
|
||||
expected: [[1, 0, 1], [0, 0, 0], [1, 0, 1]]
|
||||
- input: { matrix: [[0, 1, 2, 0], [3, 4, 5, 2], [1, 3, 1, 5]] }
|
||||
expected: [[0, 0, 0, 0], [0, 4, 5, 0], [0, 3, 1, 0]]
|
||||
hidden:
|
||||
- input: { matrix: [[1, 2, 3], [4, 5, 6]] }
|
||||
expected: [[1, 2, 3], [4, 5, 6]]
|
||||
- input: { matrix: [[0]] }
|
||||
expected: [[0]]
|
||||
- input: { matrix: [[1, 0, 3]] }
|
||||
expected: [[0, 0, 0]]
|
||||
|
||||
description: |
|
||||
Given an `m x n` integer matrix `matrix`, if an element is `0`, set its entire row and column to `0`'s.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user