Approach hintTry it first, then revealHide
On an opening bracket, push the string built so far and the pending repeat count; on the matching closing bracket, repeat the inner string and append it to the saved prefix.
On an opening bracket, push the string built so far and the pending repeat count; on the matching closing bracket, repeat the inner string and append it to the saved prefix.