Problem 481 · Medium

Magical String

Build a magical string where s[i] indicates how many times to repeat the next character.

Open the interactive visualisation