Can someone help me with this [problem] on spoj. I have done this problem using lazy propagation and was trying to implement less efficient simple point update for range. Can someone tell me the problem with my
Even the sample test case is not passing :(.
but why is my approach giving wrong answer for sample test case.
I am using the same approach as mentioned in hackerearth link text
This should solve the problem.
does this mean that both gfg and hackerearth gave wrong code for updation of range by modifying update function (without lazy propagation)
gfg link https://www.geeksforgeeks.org/lazy-propagation-in-segment-tree/
look before lazy propagation in above link
Help me this confusion is troublesome.
Yes if standalone, no if you supplement it with lazy propagation. They are using the previous update function to explain that the update operations are being stalled and will resume once lazy propagation stops being lazy