摘要: 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-06-05 16:37 douzujun 阅读(178) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as: a binary tree in which the dep 阅读全文
posted @ 2019-06-05 16:28 douzujun 阅读(193) 评论(0) 推荐(0) 编辑
摘要: Given a n-ary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest le 阅读全文
posted @ 2019-06-05 16:25 douzujun 阅读(227) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest l 阅读全文
posted @ 2019-06-05 16:24 douzujun 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 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-06-05 16:01 douzujun 阅读(320) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, return all root-to-leaf paths. Note: A leaf is a node with no children. Example: 阅读全文
posted @ 2019-06-05 15:20 douzujun 阅读(307) 评论(0) 推荐(0) 编辑