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

@@ -12,6 +12,24 @@ patterns:
- bfs
- heap
function_signature: "def swim_in_water(grid: list[list[int]]) -> int:"
test_cases:
visible:
- input: { grid: [[0, 2], [1, 3]] }
expected: 3
- input: { grid: [[0, 1, 2, 3, 4], [24, 23, 22, 21, 5], [12, 13, 14, 15, 16], [11, 17, 18, 19, 20], [10, 9, 8, 7, 6]] }
expected: 16
hidden:
- input: { grid: [[0]] }
expected: 0
- input: { grid: [[3, 2], [0, 1]] }
expected: 3
- input: { grid: [[0, 1, 2], [5, 4, 3], [6, 7, 8]] }
expected: 4
- input: { grid: [[7, 5, 3], [2, 0, 6], [1, 4, 8]] }
expected: 7
description: |
You are given an `n x n` integer matrix `grid` where each value `grid[i][j]` represents the elevation at that point `(i, j)`.