Can you give me test case 1 since it is not passing?

here is passing all test cases except for the first???

Hello @ssanjuchandra, pls refer this …


This code is passing all the cases.
This is your modified code. See it is allowed in that to take one node with neg value and another with positive value if they are getting overall max value and your code was not considering this.
In line no. 23 I made max1 and max2 = -1e16 , so that while maximising them the negative value can also come.