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