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:
- prefix-sum
function_signature: "def average_value(nums: list[int]) -> int:"
test_cases:
visible:
- input: { nums: [1, 3, 6, 10, 12, 15] }
expected: 9
- input: { nums: [1, 2, 4, 7, 10] }
expected: 0
hidden:
- input: { nums: [6] }
expected: 6
- input: { nums: [6, 12, 18] }
expected: 12
- input: { nums: [1, 2, 3, 4, 5] }
expected: 0
- input: { nums: [6, 6, 6, 6] }
expected: 6
- input: { nums: [12, 24, 36, 48, 60] }
expected: 36
- input: { nums: [5, 7, 11, 13, 17, 19] }
expected: 0
- input: { nums: [6, 12, 1, 2, 3, 18] }
expected: 12
description: |
Given an integer array `nums` of **positive** integers, return *the average value of all even integers that are divisible by* `3`.