why we are not returning max(case1,case2,case3,case4)
suppose 10 is root and 20 and 30 it’s child.
according to your expla. it will return max(20,30,0)+10.
but 20+30+10 is max sum.
plz clear my doubt
I have doubt when we are returning value
ok i got that…