Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create MaximumPathSumBetweenTwoLeafNodes.cpp #2320

Merged
merged 1 commit into from
Oct 4, 2022
Merged

Create MaximumPathSumBetweenTwoLeafNodes.cpp #2320

merged 1 commit into from
Oct 4, 2022

Conversation

spaceman-dev
Copy link
Contributor

Given a binary tree in which each node element contains a number. Find the maximum possible sum from one leaf node to another leaf node. Note: Here Leaf node is a node which is connected to exactly one different node. Example 1:
Input:
3
/ \
4 5
/ \
-10 4
Output: 16
Explanation: Maximum Sum lies between leaf node 4 and 5. 4 + 4 + 3 + 5 = 16.

Problem

Solution

Changes proposed in this Pull Request :

  • 1.
  • ..

Other changes

Given a binary tree in which each node element contains a number. Find the maximum possible sum from one leaf node to another leaf node.
Note: Here Leaf node is a node which is connected to exactly one different node.
Example 1:
Input:      
       3                               
     /    \                          
   4       5                     
  /  \      
-10   4                          
Output: 16
Explanation: Maximum Sum lies between leaf node 4 and 5. 4 + 4 + 3 + 5 = 16.
@fineanmol fineanmol merged commit 771025b into fineanmol:master Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants