feat(content): more test cases
This commit is contained in:
@@ -10,6 +10,32 @@ categories:
|
||||
patterns:
|
||||
- monotonic-stack
|
||||
|
||||
function_signature: "def decode_string(s: str) -> str:"
|
||||
|
||||
test_cases:
|
||||
visible:
|
||||
- input: { s: "3[a]2[bc]" }
|
||||
expected: "aaabcbc"
|
||||
- input: { s: "3[a2[c]]" }
|
||||
expected: "accaccacc"
|
||||
- input: { s: "2[abc]3[cd]ef" }
|
||||
expected: "abcabccdcdcdef"
|
||||
hidden:
|
||||
- input: { s: "abc" }
|
||||
expected: "abc"
|
||||
- input: { s: "10[a]" }
|
||||
expected: "aaaaaaaaaa"
|
||||
- input: { s: "2[2[2[b]]]" }
|
||||
expected: "bbbbbbbb"
|
||||
- input: { s: "1[ab]" }
|
||||
expected: "ab"
|
||||
- input: { s: "2[xy3[z]]" }
|
||||
expected: "xyzzzxyzzz"
|
||||
- input: { s: "2[a2[b]]" }
|
||||
expected: "abbabb"
|
||||
- input: { s: "100[x]" }
|
||||
expected: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
|
||||
description: |
|
||||
Given an encoded string, return its decoded string.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user