程序媛詹妮弗
终身学习

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 ).

Example 1:

Input: "()())()"
Output: ["()()()", "(())()"]
Example 2:

Input: "(a)())()"
Output: ["(a)()()", "(a())()"]
Example 3:

Input: ")("
Output: [""]

 

posted on 2018-10-18 05:18  程序媛詹妮弗  阅读(164)  评论(0编辑  收藏  举报