Given a Binary Tree, find the maximum sum in a binary tree by adding the parent with its children. Exactly three Node needs to be added. If the tree does not have a node with both of its children as not NULL, return 0.
We simply traverse the tree and find the Node that has the maximum sum. We need to take care of the leaves.
- Convert an arbitrary Binary Tree to a tree that holds Children Sum Property
- Node having maximum sum of immediate children and itself in n-ary tree
- Check for Children Sum Property in a Binary Tree
- Count nodes with two children at level L in a Binary Tree
- Iterative approach to check for children sum property in a Binary Tree
- Sum of all parent-child differences in a Binary Tree
- Construct Binary Tree from given Parent Array representation
- Find right sibling of a binary tree with parent pointers
- Find Height of Binary Tree represented by Parent array
- Lowest Common Ancestor in a Binary Tree | Set 2 (Using Parent Pointer)
- Count all Grandparent-Parent-Child Triplets in a binary tree whose sum is greater than X
- Construct Binary Tree from given Parent Array representation | Iterative Approach
- Maximum sub-tree sum in a Binary Tree such that the sub-tree is also a BST
- Number of children of given node in n-ary Tree
- Find root of the tree where children id sum for every node is given
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.