feat(content): function signatures + test cases

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

View File

@@ -10,6 +10,30 @@ categories:
patterns:
- dynamic-programming
function_signature: "def number_of_arithmetic_slices(nums: list[int]) -> int:"
test_cases:
visible:
- input: { nums: [2, 4, 6, 8, 10] }
expected: 7
- input: { nums: [7, 7, 7, 7, 7] }
expected: 16
hidden:
- input: { nums: [1] }
expected: 0
- input: { nums: [1, 2] }
expected: 0
- input: { nums: [1, 2, 3] }
expected: 1
- input: { nums: [1, 3, 5, 7] }
expected: 3
- input: { nums: [0, 0, 0, 0] }
expected: 5
- input: { nums: [1, 1, 1, 1, 1, 1] }
expected: 42
- input: { nums: [1, 2, 3, 4, 5, 6] }
expected: 12
description: |
Given an integer array `nums`, return *the number of all the **arithmetic subsequences** of* `nums`.