LeetCode – Remove Invalid Parentheses (Java)
Remove the minimum number of invalid parentheses in order to make the input string valid. Return all possible results. Note: The input string may contain letters other than the parentheses ( and ). Examples: “()())()” -> [“()()()”, “(())()”] “(a)())()” -> [“(a)()()”, “(a())()”] “)(” -> [“”] Java Solution This problem can be solve by using DFS. … Read more