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

@@ -10,6 +10,22 @@ patterns:
- dfs
- dynamic-programming
function_signature: "def cat_mouse_game(graph: list[list[int]]) -> int:"
test_cases:
visible:
- input: { graph: [[2, 5], [3], [0, 4, 5], [1, 4, 5], [2, 3], [0, 2, 3]] }
expected: 0
- input: { graph: [[1, 3], [0], [3], [0, 2]] }
expected: 1
hidden:
- input: { graph: [[2, 3], [3, 4], [0, 4], [0, 1], [1, 2]] }
expected: 1
- input: { graph: [[2, 5], [3], [0, 4, 5], [1, 4, 5], [2, 3], [0, 2, 3]] }
expected: 0
- input: { graph: [[1], [0, 2, 4], [1, 3], [2], [1]] }
expected: 2
description: |
A game on an **undirected** graph is played by two players, Mouse and Cat, who alternate turns.