I'm learning segment tree data structure and I've learned the (Build, update, query) functions,and I'm trying to make an update on an interval using lazy propagation algorithm but I can't find the correct implementation of it. Would you please provide me with the correct code of lazy p...
I am learning segment tree with lazy propagation but i can't find good tutorial. Can anyone post a code that implements this two operation with segment tree and lazy propagation: a-add a value to every element in a interval b-get the. sum of interval. Thanks in advance....
Hello, I'd like to share a cool trick, i came across recently. No doubt some people will be familiar with this, but i believe many won't be, simply because when it comes to Lazy Propagation most people use segment trees in contest. This method, although not as flexible, is far ...
lazy propagation,segment tree,lightoj +5 faiyaz26 13 years ago 7 vitar 13 years ago,#| +11 Here you have just 2 different kind of updates: 1)add a linear function 2)set a linear function. It is convenient to consider indexes of an array as point on X axis. Than you can transform...