DFS
Data Structures & Algorithms · 2 notes
- Remove Invalid Parentheseshistorical
Enumerate whether to keep or remove each character, then keep the longest valid-parentheses results.
- Generate Parentheseshistorical
Generate parentheses using full enumeration with a stack, and pruning based on remaining left/right parentheses.