消息推送Leetcode每日一题 —— 1021. 删除最外层的括号09:00 · 2026年10月8日 · 周四Leetcode每日一题 —— 1021. 删除最外层的括号🌐 链接: https://linux.do/t/topic/2992468🏷️ 分组: LinuxDo论坛🕒 时间: 2026-10-08 08:55:56 LINUX DO Leetcode每日一题 —— 1021. 删除最外层的括号 佬友们国庆快乐~ 思路 把深度1的括号删掉就可以。 代码 class Solution { public String removeOuterParentheses(String s) { StringBuilder sb = new StringBuilder(); int deep = 0; for (char chr : s.toCharArray()) { if (chr == '(') { … 09:00 · 2026年10月8日 · 周四