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
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
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
相关文章推荐
- [LeetCode#110, 112, 113]Balanced Binary Tree, Path Sum, Path Sum II
- Binary Tree Maximum Path Sum II
- Binary Tree Maximum Path Sum,Unique Binary Search Trees I,II, Recover Binary Search Tree
- *Leetcode_binary-tree-maximum-path-sum (updated c++ and python version)
- [lintcode] Binary Tree Maximum Path Sum II
- [lintcode] Binary Tree Maximum Path Sum II
- 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. For example: Given the below binary tree andsum =
- leetcode -day17 Path Sum I II & Flatten Binary Tree to Linked List & Minimum Depth of Binary Tree
- [刷题]Binary Tree Maximum Path Sum II
- Binary Tree Path Sum II
- Binary Tree Path Sum II
- Binary Tree Maximum Path Sum
- Binary Tree Maximum Path Sum 求二叉树的最大路径和
- leetcode4: Binary Tree Maximum Path Sum
- [LeetCode] 014: Binary Tree Maximum Path Sum
- 【leetcode】Binary Tree Maximum Path Sum
- 124. Binary Tree Maximum Path Sum (Tree; DFS)
- Binary Tree Maximum Path Sum
- [LeetCode]124 Binary Tree Maximum Path Sum
- Binary Tree Maximum Path Sum [leetcode] dp