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

@@ -8,6 +8,26 @@ categories:
patterns:
- sliding-window
function_signature: "def digit_sum(s: str, k: int) -> str:"
test_cases:
visible:
- input: { s: "11111222223", k: 3 }
expected: "135"
- input: { s: "00000000", k: 3 }
expected: "000"
hidden:
- input: { s: "1", k: 2 }
expected: "1"
- input: { s: "123", k: 3 }
expected: "123"
- input: { s: "999", k: 2 }
expected: "27"
- input: { s: "12345", k: 2 }
expected: "39"
- input: { s: "111111", k: 2 }
expected: "6"
description: |
You are given a string `s` consisting of digits and an integer `k`.