feat(content): more test cases

This commit is contained in:
2025-07-13 19:25:39 +01:00
parent e28da5def2
commit 0f264ef603
94 changed files with 1840 additions and 0 deletions

View File

@@ -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: