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

@@ -11,6 +11,26 @@ patterns:
- backtracking
- dynamic-programming
function_signature: "def all_possible_fbt(n: int) -> list[TreeNode]:"
test_cases:
visible:
- input: { n: 7 }
expected: 5
- input: { n: 3 }
expected: 1
hidden:
- input: { n: 1 }
expected: 1
- input: { n: 2 }
expected: 0
- input: { n: 5 }
expected: 2
- input: { n: 9 }
expected: 14
- input: { n: 4 }
expected: 0
description: |
Given an integer `n`, return *a list of all possible **full binary trees** with* `n` *nodes*. Each node of each tree in the answer must have `Node.val == 0`.