Please help me
Replace with sum of greater nodes
@Gade_Deepthi
Your logic is correct. Just there is slight mistake in your code
- return type of modifysum() should be void. So change line no 29 to void modifysum(node *root,int *sum)
- Change line 33 to return;
Your code will work fine for all cases.