link to my code : https://ide.codingblocks.com/s/243021
I checked with the code shown in video, but still only 1 testcase passed out of 4.
What’s wrong with my code ???
3 testcase failed
hello @O17LPOLA020011
a) summation can exceed the range of int so use long long
b) total sum of a node can also be a valid candidate for maximum so include that as well while updating max sum of a node
still not working
int is defined as long long as a macro
link to code after the above update : https://ide.codingblocks.com/s/244230
this line should be
also
check ur updated code here
That worked !
Thank you so much for your time and effort.
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.