Decode String
Given an encoded string s, decode it using the rule k[encoded_string], meaning that encoded_string is repeated exactly k times, where k is a positive integer.
The encoding may be nested. Th...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Standard Input
Execution Result:
