leetcode20-Valid Parentheses有效的括号

利用栈 编程方式一:按照课本上思路改写的 class Solution: def isValid(self, s: str) -> bool: map={'(':')','[':']','{':'}'} match=True i=0 stack=[] while i<len(s) and match:
相关文章
相关标签/搜索