Hey …
I cant really get what is going on in the question and why certain test cases have such answer …
For eg …
9
59 48 48 14 51 51 86 53 58
2 1 -47
3 5 10
4 8 -6
5 9 46
6 2 -69
7 8 -79
8 9 92
9 6 12
this test case has answer of 5 …
I drew the tree for the case but can see only 4 nodes as the ans …
pls let me know what is actually going on in here
Maybe … I can share the tree …
This is the tree for the test case