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