Max sum path from any node to node

why are we taking maxsum . what’s the intuition behind it.couldn’t we directly do it from the branch sum

Hello @shashankmaheshwari054
types of solutions for every subtree:

  1. the max combinable solution, which includes the root of the subtree, and can be used by parent solutions.
  2. the max non-combinable solution, which either doesn’t include the root, or includes both the root and left+right subtrees of the root.