NeetCode #515LC-1087MediumBacktrackingNC Algo100
← Back to All Problems

#515 · #1087 · Brace Expansion(花括号展开)

📌 Problem Statement & Constraints

You are given a string expression representing a brace expansion, e.g. "{a,b}{c,{d,e}}". Return all words generated by the expansion, sorted in lexicographic order without duplicates. Constraints: 1 <= expression.length <= 60; the expression consists of lowercase letters, {, } and ,.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!