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
- Find the parent of a node in the given binary tree
- Sum of all the child nodes with even parent values in a Binary Tree
- Construct Binary Tree from given Parent Array representation
- Find right sibling of a binary tree with parent pointers
- Lowest Common Ancestor in a Binary Tree | Set 2 (Using Parent Pointer)
- Find Height of Binary Tree represented by Parent array
- 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
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.