Problems > Run-Length Decoding > Editorial

Run-Length Decoding — Solution & Editorial

Back to the Problem

Parse letter + number pairs; counts may have several digits, so read all consecutive digits.

Complexity: O(output length)

Watch out: Counts can be two digits — reading a single digit character fails on b12.