why are we taking maxsum . what’s the intuition behind it.couldn’t we directly do it from the branch sum
Max sum path from any node to node
Hello @shashankmaheshwari054
types of solutions for every subtree:
- the max combinable solution, which includes the root of the subtree, and can be used by parent solutions.
- the max non-combinable solution, which either doesn’t include the root, or includes both the root and left+right subtrees of the root.