feat(content): more test cases

This commit is contained in:
2025-07-13 19:25:39 +01:00
parent d2b74b6863
commit 85fea3a4bb
94 changed files with 1840 additions and 0 deletions

View File

@@ -10,6 +10,22 @@ patterns:
- dfs
- bfs
function_signature: "def clone_graph(node: Node | None) -> Node | None:"
test_cases:
visible:
- input: { adjList: [[2, 4], [1, 3], [2, 4], [1, 3]] }
expected: [[2, 4], [1, 3], [2, 4], [1, 3]]
- input: { adjList: [[]] }
expected: [[]]
- input: { adjList: [] }
expected: []
hidden:
- input: { adjList: [[2], [1]] }
expected: [[2], [1]]
- input: { adjList: [[2, 3], [1, 3], [1, 2]] }
expected: [[2, 3], [1, 3], [1, 2]]
description: |
Given a reference of a node in a **connected** undirected graph.