@l_returns
Thank you so much for devoting too much time and find out what was wrong I almost gave up on this problem.
I have finally got accepted.
I wrote shift function that way so that the remaining changes of parents could propagated to children. Did you understand why my shift function didn’t work.
Yeah I do mentioned what was wrong…
In the example I gave above in this answer… your code will either mark both or it unmark both…
Note that “mark” means lazy[node] = 1.
And unmark means lazy[node] =0
1 Like
@l_returns
You have done a great help to me in solving this question. I am really very thankful to you for this one.
Thank you.