pritishn's blog

By pritishn, history, 6 years ago, In English

Hi,
I wanted to know how to make segment tree with
Lazy propagation for Range Assignment Updates (make elements in range L to R equals to update_Val) and Range Sum Queries.
I am not able to code it properly and also I couldn't find any proper tutorial for this specific set of operations.

Can anyone share the code for doing that?

  • Vote: I like it
  • +13
  • Vote: I do not like it

»
6 years ago, hide # |
 
Vote: I like it +3 Vote: I do not like it
»
6 years ago, hide # |
Rev. 2  
Vote: I like it +6 Vote: I do not like it

i think this might work

https://ideone.com/ohH0nh