feat(content): hidden test cases

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

View File

@@ -11,6 +11,24 @@ patterns:
- matrix-traversal
- dfs
function_signature: "def construct(grid: list[list[int]]) -> Node:"
test_cases:
visible:
- input: { grid: [[0, 1], [1, 0]] }
expected: [[0, 1], [1, 0], [1, 1], [1, 1], [1, 0]]
- input: { grid: [[1, 1], [1, 1]] }
expected: [[1, 1]]
hidden:
- input: { grid: [[0]] }
expected: [[1, 0]]
- input: { grid: [[1]] }
expected: [[1, 1]]
- input: { grid: [[0, 0], [0, 0]] }
expected: [[1, 0]]
- input: { grid: [[1, 1, 0, 0], [1, 1, 0, 0], [0, 0, 1, 1], [0, 0, 1, 1]] }
expected: [[0, 1], [1, 1], [1, 0], [1, 0], [1, 1]]
description: |
Given a `n * n` matrix `grid` of `0`s and `1`s only. We want to represent `grid` with a Quad-Tree.