← All problems
Valid Parentheses (extended: minimum removals)
Given a bracket string, remove the minimum brackets to make it valid.
Complexity
Time O(n), Space O(n)
Common pitfalls
- Removing valid pairs
- Not handling all bracket types
Your solution
Log in to save your code and track progress.