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

@@ -9,6 +9,30 @@ categories:
patterns:
- binary-search
function_signature: "def ship_within_days(weights: list[int], days: int) -> int:"
test_cases:
visible:
- input: { weights: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], days: 5 }
expected: 15
- input: { weights: [3, 2, 2, 4, 1, 4], days: 3 }
expected: 6
- input: { weights: [1, 2, 3, 1, 1], days: 4 }
expected: 3
hidden:
- input: { weights: [1], days: 1 }
expected: 1
- input: { weights: [10, 10, 10], days: 3 }
expected: 10
- input: { weights: [10, 10, 10], days: 1 }
expected: 30
- input: { weights: [1, 2, 3, 4, 5], days: 1 }
expected: 15
- input: { weights: [1, 2, 3, 4, 5], days: 5 }
expected: 5
- input: { weights: [500, 500, 500, 500], days: 2 }
expected: 1000
description: |
A conveyor belt has packages that must be shipped from one port to another within `days` days.