feat(content): hidden test cases

This commit is contained in:
2025-08-06 23:21:42 +01:00
parent 89b5dd1457
commit 6bed0a6787
134 changed files with 2075 additions and 0 deletions

View File

@@ -14,6 +14,26 @@ patterns:
- heap
- matrix-traversal
function_signature: "def minimum_effort_path(heights: list[list[int]]) -> int:"
test_cases:
visible:
- input: { heights: [[1, 2, 2], [3, 8, 2], [5, 3, 5]] }
expected: 2
- input: { heights: [[1, 2, 3], [3, 8, 4], [5, 3, 5]] }
expected: 1
- input: { heights: [[1, 2, 1, 1, 1], [1, 2, 1, 2, 1], [1, 2, 1, 2, 1], [1, 2, 1, 2, 1], [1, 1, 1, 2, 1]] }
expected: 0
hidden:
- input: { heights: [[1]] }
expected: 0
- input: { heights: [[1, 2]] }
expected: 1
- input: { heights: [[1], [2]] }
expected: 1
- input: { heights: [[1, 10, 6, 7, 9, 10, 4, 9]] }
expected: 9
description: |
You are a hiker preparing for an upcoming hike. You are given `heights`, a 2D array of size `rows x columns`, where `heights[row][col]` represents the height of cell `(row, col)`. You are situated in the top-left cell, `(0, 0)`, and you hope to travel to the bottom-right cell, `(rows-1, columns-1)` (i.e., **0-indexed**). You can move **up**, **down**, **left**, or **right**, and you wish to find a route that requires the minimum **effort**.