feat(content): function signatures + test cases

This commit is contained in:
2025-07-13 19:53:34 +01:00
parent d65ccf7dc2
commit 0262ca8bf6
203 changed files with 4526 additions and 0 deletions

View File

@@ -12,6 +12,32 @@ patterns:
- dynamic-programming
- matrix-traversal
function_signature: "def longest_increasing_path(matrix: list[list[int]]) -> int:"
test_cases:
visible:
- input: { matrix: [[9, 9, 4], [6, 6, 8], [2, 1, 1]] }
expected: 4
- input: { matrix: [[3, 4, 5], [3, 2, 6], [2, 2, 1]] }
expected: 4
- input: { matrix: [[1]] }
expected: 1
hidden:
- input: { matrix: [[1, 2], [4, 3]] }
expected: 4
- input: { matrix: [[1, 2, 3], [6, 5, 4], [7, 8, 9]] }
expected: 9
- input: { matrix: [[7, 8, 9], [6, 1, 2], [5, 4, 3]] }
expected: 7
- input: { matrix: [[1, 1, 1], [1, 1, 1], [1, 1, 1]] }
expected: 1
- input: { matrix: [[9, 8, 7], [6, 5, 4], [3, 2, 1]] }
expected: 9
- input: { matrix: [[1, 2, 3, 4, 5]] }
expected: 5
- input: { matrix: [[5], [4], [3], [2], [1]] }
expected: 5
description: |
Given an `m x n` integers `matrix`, return *the length of the longest increasing path in* `matrix`.