← Swiggy questions

Expand a string with repeat counts in braces

Filed under Swiggy

Expand a string containing repeat counts in braces. A count {k} repeats everything built so far (the entire preceding prefix) k times. For example, 'ab{2}c' becomes 'ababc' and 'xy{2}bd{2}' becomes…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Swiggy questions

Collected from public candidate posts and coding forums. Updated Nov 2026.