摘要:
递归实现(python):# Definition for a binary tree nodeclass TreeNode: def __init__(self, x): self.val = x self.left = None self... 阅读全文
摘要:
典型的用栈(stack)结构解决问题的例子class Solution: def isPair(self,s1,s2): if (s1=='(' and s2==')')or (s2=='(' and s1==')'): return True ... 阅读全文