摘要: 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 @ 2018-04-14 21:53 Vincent丶丶 阅读(178) 评论(0) 推荐(0) 编辑
摘要: Given a complete binary tree, count the number of nodes. Definition of a complete binary tree from Wikipedia:In a complete binary tree every level, ex 阅读全文
posted @ 2018-04-14 19:02 Vincent丶丶 阅读(137) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, find the maximum path sum. For this problem, a path is defined as any sequence of nodes from some starting node to any node in th 阅读全文
posted @ 2018-04-14 15:24 Vincent丶丶 阅读(158) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. An example is the root-to-leaf path 1->2->3 whic 阅读全文
posted @ 2018-04-14 14:48 Vincent丶丶 阅读(163) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum. For example:Given the below binary tree and sum 阅读全文
posted @ 2018-04-14 10:32 Vincent丶丶 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 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. F 阅读全文
posted @ 2018-04-14 10:02 Vincent丶丶 阅读(138) 评论(0) 推荐(0) 编辑