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

@@ -10,6 +10,26 @@ patterns:
- dfs
- greedy
function_signature: "def min_camera_cover(root: TreeNode) -> int:"
test_cases:
visible:
- input: { root: [0, 0, null, 0, 0] }
expected: 1
- input: { root: [0, 0, null, 0, null, 0, null, null, 0] }
expected: 2
hidden:
- input: { root: [0] }
expected: 1
- input: { root: [0, 0] }
expected: 1
- input: { root: [0, 0, 0] }
expected: 1
- input: { root: [0, 0, 0, 0, 0, 0, 0] }
expected: 2
- input: { root: [0, 0, null, 0, null, 0, null, 0] }
expected: 2
description: |
You are given the `root` of a binary tree. We install cameras on the tree nodes where each camera at a node can monitor its parent, itself, and its immediate children.