摘要: 1 class Solution: 2 def __init__(self): 3 self.result = TreeNode(-1) 4 5 def preOrder(self,node,target): 6 if node != None: 7 if node.val == target.va 阅读全文
posted @ 2020-03-21 19:23 Sempron2800+ 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 1 class CustomStack: 2 def __init__(self, maxSize: int): 3 self.maxSize = maxSize 4 self.stack = [0] * maxSize 5 self.position = -1 6 7 def push(self, 阅读全文
posted @ 2020-03-21 19:10 Sempron2800+ 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 1 class Solution { 2 int maxpath = 0; 3 HashMap<TreeNode, Integer> map1 = new HashMap<TreeNode, Integer>(); 4 HashMap<TreeNode, Integer> map2 = new Ha 阅读全文
posted @ 2020-03-21 18:03 Sempron2800+ 阅读(158) 评论(0) 推荐(0) 编辑