feat(content): function signatures + test cases

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

View File

@@ -10,6 +10,30 @@ categories:
patterns:
- dynamic-programming
function_signature: "def best_team_score(scores: list[int], ages: list[int]) -> int:"
test_cases:
visible:
- input: { scores: [1, 3, 5, 10, 15], ages: [1, 2, 3, 4, 5] }
expected: 34
- input: { scores: [4, 5, 6, 5], ages: [2, 1, 2, 1] }
expected: 16
- input: { scores: [1, 2, 3, 5], ages: [8, 9, 10, 1] }
expected: 6
hidden:
- input: { scores: [1], ages: [1] }
expected: 1
- input: { scores: [5, 5], ages: [3, 3] }
expected: 10
- input: { scores: [1, 1, 1, 1, 1], ages: [5, 4, 3, 2, 1] }
expected: 5
- input: { scores: [10, 20, 5], ages: [1, 2, 3] }
expected: 35
- input: { scores: [319, 776], ages: [8, 3] }
expected: 776
- input: { scores: [9, 2, 8, 8, 2], ages: [4, 1, 3, 3, 5] }
expected: 27
description: |
You are the manager of a basketball team. For the upcoming tournament, you want to choose the team with the highest overall score. The score of the team is the **sum** of scores of all the players in the team.