摘要: 20. 有效的括号 思路:分析出三种情况,画图模拟。写代码容易写错。 class Solution: def isValid(self, s: str) -> bool: a_stack = list() for i in s: if i == '(': a_stack.append(')') el 阅读全文
posted @ 2023-10-22 21:12 忆象峰飞 阅读(11) 评论(0) 推荐(0)