摘要: Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum. 通过一个p指针,遍历 二叉树,并将每次的值 保存在 sum2 中 。 遇到右节点,将右节点+d 阅读全文
posted @ 2016-05-16 20:48 NeilZhang 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 不能通过 当元素中 有 val == INT_MAX 或者 val == INT_MIN 阅读全文
posted @ 2016-05-16 14:09 NeilZhang 阅读(208) 评论(0) 推荐(0) 编辑