LeetCode
1096. Brace Expansion II — a recursive-descent parser for nested braces (C++)
Brace Expansion II is a small nested grammar, not a scan: I parse it with three mutually recursive functions over a shared cursor, letting each unit produce a std::set of strings so sorting and dedup come free.
Loading…