← Google questions

Expand string with curly brace permutations

Filed under Google

Given a string expression containing sets of curly braces like {1, 2, 3}{a, b}, expand it to generate all possible combinations (Cartesian product) in lexicographical order. The pattern can contain…

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 Google questions

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