Hey I didn’t understand what is branch sum here in the problem
Branch Sum issue
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
- left branch sum
- right branch sum
- max sum of left subtree
- 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