Home
Topics
Practice
Roadmap
DSA Tracker
Code Editor
Tech Blogs
More
Sign in
Get started
Loading question...
Feedback
Remove Invalid Parentheses
Medium
00:00
0 users online
Share
Description
Solution
Submissions
Discussion
Remove minimum number of invalid parentheses to make the input string valid.
Sample Input:
"()())()"
Sample Output:
["()()()", "(())()"]
Hints
Hint 1
Use BFS to explore all possibilities
Hint 2
Check if string is valid before adding to queue
Hint 3
Stop when first valid strings are found
Code Editor
Reset
Run
Save
Loading...