Decode Nested Repeat

Programming Interview Hard 5 views
Back to Questions

Problem Description

A string is provided in form like 3[a2[c]] where number means repeat. Decode and output the final string.

Input Format

One line encoded.

Output Format

One line decoded.

Sample Test Case

Input:
3[a2[c]]
Output:
accaccacc

Constraints

Total decoded length

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next