摘要:
def isValid(self,s): stack = [] paren_map = {')': '(', ']': '[', '}': '{'} for c in s: if c not in paren_map: stack.append(c) elif not stack or paren_map[c] !=... 阅读全文
摘要:
class Solution1(object): def __init__(self,x): self.val = x self.next = None def reverse_list(head): cur, pre = head, None while cur: cur.next... 阅读全文