Fork me on GitHub
摘要: Minimum Remove to Make Valid Parentheses 移除无效的括号 给出一个string,其中包含(, ),以及小写字母a~z组成,要求删掉最少的(或),使得剩余的字符串是有效的括号字符串。 Input: s = "a)b(c)d" Output: "ab(c)d" I 阅读全文
posted @ 2021-04-15 09:36 WilliamCui 阅读(89) 评论(0) 推荐(0)
摘要: Remove Outermost Parentheses 删除最外层的括号 Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string i 阅读全文
posted @ 2021-04-15 09:31 WilliamCui 阅读(58) 评论(0) 推荐(0)