1087. Brace Expansion
StringBacktrackingStackBreadth-First SearchSorting
Hints
Hint 1
All generated strings are of the same size. How can we generate all of these strings?
Hint 2
Do a backtracking on which each level of it has to choose one single (e.g. 'a') character or any character of the given parenthesized group (e.g. "{a,b,c}")
Preparing judge…