Decode String
Updated Feb 24, 2026
Problem
Decode strings encoded as k[encoded_string].
Constraints
1 <= s.length <= 30
Examples
Example 1
Input:
{"s": "3[a]2[bc]"}
Output:
"aaabcbc"
Function Signature
def decodeString(self, s: str) -> str
How to Submit
Implement a Solution class with a decodeString method.
Your method will be called with the input parameters and should return the answer.