Skip to content

Latest commit

 

History

History
11 lines (8 loc) · 380 Bytes

File metadata and controls

11 lines (8 loc) · 380 Bytes

Problem 11: Pattern Expander

Problem Statement

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. k is guaranteed to be a positive integer.

Input Format

  • A string s.

Example

Input: s = "3[a2[c]]"
Output: "accaccacc"