feat(content): function signatures + test cases

This commit is contained in:
2025-07-13 19:53:34 +01:00
parent 9e6c6d256f
commit 65a8d525f5
203 changed files with 4526 additions and 0 deletions

View File

@@ -11,6 +11,30 @@ categories:
patterns:
- dynamic-programming
function_signature: "def num_factored_binary_trees(arr: list[int]) -> int:"
test_cases:
visible:
- input: { arr: [2, 4] }
expected: 3
- input: { arr: [2, 4, 5, 10] }
expected: 7
hidden:
- input: { arr: [2] }
expected: 1
- input: { arr: [2, 3, 5, 7, 11] }
expected: 5
- input: { arr: [2, 4, 8] }
expected: 7
- input: { arr: [2, 4, 8, 16] }
expected: 15
- input: { arr: [2, 3, 6, 18] }
expected: 7
- input: { arr: [18, 3, 6, 2] }
expected: 7
- input: { arr: [2, 4, 16, 8] }
expected: 15
description: |
Given an array of unique integers, `arr`, where each integer `arr[i]` is strictly greater than `1`.