GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing leetcode.cn — 1249. 移除无效的括号 - 力扣(LeetCode) 题目描述 题目描述 题解 题解 提交记录 提交记录 中等 给你一个由 你需要从字符串中删除最少数目的 请返回任意一个合法字符串。 有效「括号字符串」应当符合以下 任意一条 要求:
示例 1: 输入:s = "lee(t(c)o)de)" 输出:"lee(t(c)o)de" 解释:"lee(t(co)de)" , "lee(t(c)ode)" 也是一个可行答案。 示例 2: 输入:s = "a)b(c)d" 输出:"ab(c)d" 示例 3: 输入:s = "))(("
输出:""
解释:空字符串也是有效的
提示:
代码 代码 测试用例 测试用例 测试结果 测试结果 |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |