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:
- two-pointers
function_signature: "def can_make_arithmetic_progression(arr: list[int]) -> bool:"
test_cases:
visible:
- input: { arr: [3, 5, 1] }
expected: true
- input: { arr: [1, 2, 4] }
expected: false
hidden:
- input: { arr: [1, 2] }
expected: true
- input: { arr: [5, 5, 5, 5] }
expected: true
- input: { arr: [0, 0] }
expected: true
- input: { arr: [-1, -5, -3] }
expected: true
- input: { arr: [1, 100] }
expected: true
- input: { arr: [1, 2, 3, 4, 6] }
expected: false
- input: { arr: [10, 5, 0, -5, -10] }
expected: true
description: |
A sequence of numbers is called an **arithmetic progression** if the difference between any two consecutive elements is the same.