234. Decode String
MediumStack
Given an encoded string, return its decoded string. The encoding rule is: k[encoded_string], where the encoded_string inside the square brackets is being repeated exactly k times.
Examples
Input: 3[a]2[bc]
Output: aaabcbc
Explanation: Public test case for Decode String
Constraints
- 1 <= s.length <= 30
- s consists of lowercase English letters, digits, and square brackets.
Loading...
Run checks all cases above. Submit evaluates all test cases.