Decode String
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.
Decode String

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.

Example 1:
Input: "3[a]2[bc]"
Output: aaabcbc
Input
arr ="3[a]2[bc]"

Decode string: "3[a]2[bc]"

Input String
3
[
a
]
2
[
b
c
]
Stack (bottom to top)

Empty

Current String

""

Current Number

0

Result: ""

Variables
No variables to display
DepthFunction Call
Stack empty
0/10