Binary Tree - Maximum Sum Path From Any Node To Node


sir said there can be 4 case:

  1. LS+RS+root if all are +ve
  2. LS+root if RS is -ve
    3.Rs+root if LS is-ve
  3. root is ony +ve and LS RS are -ve
    but it could also be possible that root is -ve then it should be LS+RS according to me then why its not there?

@jatinupadhyay786 you cant have a path WITHOUT the root, so it doesnt matter what is the sign of the root.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.