feat(content): hidden test cases

This commit is contained in:
2025-08-06 23:21:42 +01:00
parent 8544efb5bf
commit e0bf8cda01
134 changed files with 2075 additions and 0 deletions

View File

@@ -10,6 +10,24 @@ patterns:
- union-find
- matrix-traversal
function_signature: "def hit_bricks(grid: list[list[int]], hits: list[list[int]]) -> list[int]:"
test_cases:
visible:
- input: { grid: [[1, 0, 0, 0], [1, 1, 1, 0]], hits: [[1, 0]] }
expected: [2]
- input: { grid: [[1, 0, 0, 0], [1, 1, 0, 0]], hits: [[1, 1], [1, 0]] }
expected: [0, 0]
hidden:
- input: { grid: [[1]], hits: [[0, 0]] }
expected: [0]
- input: { grid: [[1, 1, 1], [0, 1, 0], [0, 0, 0]], hits: [[0, 1]] }
expected: [1]
- input: { grid: [[1, 0, 1], [1, 1, 1]], hits: [[0, 0], [1, 1]] }
expected: [0, 3]
- input: { grid: [[1, 1], [1, 1]], hits: [[0, 0]] }
expected: [0]
description: |
You are given an `m x n` binary `grid`, where each `1` represents a brick and `0` represents an empty space. A brick is **stable** if: