feat(content): more test cases
This commit is contained in:
@@ -10,6 +10,24 @@ patterns:
|
||||
- bfs
|
||||
- matrix-traversal
|
||||
|
||||
function_signature: "def oranges_rotting(grid: list[list[int]]) -> int:"
|
||||
|
||||
test_cases:
|
||||
visible:
|
||||
- input: { grid: [[2, 1, 1], [1, 1, 0], [0, 1, 1]] }
|
||||
expected: 4
|
||||
- input: { grid: [[2, 1, 1], [0, 1, 1], [1, 0, 1]] }
|
||||
expected: -1
|
||||
- input: { grid: [[0, 2]] }
|
||||
expected: 0
|
||||
hidden:
|
||||
- input: { grid: [[0]] }
|
||||
expected: 0
|
||||
- input: { grid: [[1]] }
|
||||
expected: -1
|
||||
- input: { grid: [[2, 1, 1], [1, 1, 1], [1, 1, 2]] }
|
||||
expected: 2
|
||||
|
||||
description: |
|
||||
You are given an `m x n` `grid` where each cell can have one of three values:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user