2019年3月21日

101. Symmetric Tree(树的对称)

摘要: Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree [1,2,2,3,4,4,3] is symmet 阅读全文

posted @ 2019-03-21 20:26 shaer 阅读(110) 评论(0) 推荐(0) 编辑

572. Subtree of Another Tree(子树)

摘要: Given two non-empty binary trees s and t, check whether tree t has exactly the same structure and node values with a subtree of s. A subtree of s is a 阅读全文

posted @ 2019-03-21 20:06 shaer 阅读(104) 评论(0) 推荐(0) 编辑

437. Path Sum III(统计路径和等于一个数的路径数量)

摘要: You are given a binary tree in which each node contains an integer value. Find the number of paths that sum to a given value. The path does not need t 阅读全文

posted @ 2019-03-21 12:01 shaer 阅读(158) 评论(0) 推荐(0) 编辑

112. Path Sum(判断路径和是否等于一个数)

摘要: Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum. N 阅读全文

posted @ 2019-03-21 11:35 shaer 阅读(124) 评论(0) 推荐(0) 编辑

导航