您的位置:首页 > 运维架构

Binary Tree Operations(II) - Path Sum and Cycle Detection

2014-09-13 10:28 337 查看
This is the second article on binary tree operations. For topics on binary tree build, traversal and comparison, please refer to Binary
Tree Operations(I)

Path Sum
Build Binary Tree With Cycle
Detect Cycle in Binary Tree


1. Path Sum

The Path Sum problem of binary tree is:

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.

- See more at:
http://bo-yang.github.io/2014/08/16/binary-tree-ii/#sthash.GmHRUGxv.dpuf
http://bo-yang.github.io/2014/08/16/binary-tree-ii
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: