Run-Length Decode

Medium · rating 1300 · Strings, Implementation

Read a run-length encoded string: a letter followed by a repeat count (one or more digits), repeated. Print the expanded string. For a3b2c1 print aaabbc.

Constraints: expanded length ≤ 105

Related problems

Open Run-Length Decode in Code Arena →