摘要: 20. 有效的括号 Solution 思路:左边入栈,遇到右边判断即可,最后看堆栈是否为空。 class Solution { public boolean isValid(String s) { Stack<Character> stack = new Stack<>(); char[] str 阅读全文
posted @ 2022-03-16 21:46 Frontierone 阅读(24) 评论(0) 推荐(0) 编辑