feat(content): function signatures + test cases
This commit is contained in:
@@ -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`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user