Branch Sum issue

Hey I didn’t understand what is branch sum here in the problem

Branch sum is sum of path starting from root of left or right subtree to the any node is that subtree

i hope you understand
if you have any doubt feel free to ask

which thing you did not understand here?

why two values are used ,branch sum and max ,why not just max sum

because for calculating max sum of current node we need 4 things

  1. left branch sum
  2. right branch sum
  3. max sum of left subtree
  4. max sum of right subtree
    so we have to call left and right
    each of them will return two things => branch sum and max sum