码迷,mamicode.com
首页 > 其他好文 > 详细

[leetcode]301. Remove Invalid Parentheses 去除无效括号

时间:2018-10-18 10:54:41      阅读:175      评论:0      收藏:0      [点我收藏+]

标签:pos   tput   val   ali   leetcode   imu   note   amp   letters   

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: [""]

 

[leetcode]301. Remove Invalid Parentheses 去除无效括号

标签:pos   tput   val   ali   leetcode   imu   note   amp   letters   

原文地址:https://www.cnblogs.com/liuliu5151/p/9808254.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!