feat(content): function signatures + test cases
This commit is contained in:
@@ -10,6 +10,35 @@ patterns:
|
||||
- greedy
|
||||
- heap
|
||||
|
||||
function_signature: "def longest_happy_string(a: int, b: int, c: int) -> str:"
|
||||
|
||||
test_cases:
|
||||
visible:
|
||||
- input: { a: 1, b: 1, c: 7 }
|
||||
expected: "ccaccbcc"
|
||||
note: "Other valid outputs like 'ccbccacc' are also accepted"
|
||||
- input: { a: 7, b: 1, c: 0 }
|
||||
expected: "aabaa"
|
||||
hidden:
|
||||
- input: { a: 0, b: 0, c: 1 }
|
||||
expected: "c"
|
||||
- input: { a: 1, b: 1, c: 1 }
|
||||
expected: "abc"
|
||||
note: "Any permutation is valid"
|
||||
- input: { a: 2, b: 2, c: 1 }
|
||||
expected: "aabbc"
|
||||
note: "Multiple valid outputs"
|
||||
- input: { a: 0, b: 8, c: 11 }
|
||||
expected: "ccbccbbccbbccbbccbc"
|
||||
note: "Length should be 19"
|
||||
- input: { a: 3, b: 0, c: 0 }
|
||||
expected: "aa"
|
||||
- input: { a: 0, b: 0, c: 2 }
|
||||
expected: "cc"
|
||||
- input: { a: 4, b: 4, c: 4 }
|
||||
expected: "aabbccaabbcc"
|
||||
note: "Multiple valid outputs"
|
||||
|
||||
description: |
|
||||
A string `s` is called **happy** if it satisfies the following conditions:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user