Segment Tree

Revision en2, by rahul_1234, 2017-12-15 16:57:11

Can someone provide me segment tree implementation of:

Range update : Add x to range

Finding frequency of a constant in range

I know of solution in sqrt decomposition exist, but I wanted in terms of segment tree (maybe lazy propagation)?

Tags segment_tree, sqrt_decomposition

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English rahul_1234 2017-12-15 16:57:43 32 Tiny change: 'ropagation)?' -> 'ropagation or policy based data structures)?'
en2 English rahul_1234 2017-12-15 16:57:11 12 Tiny change: ' know of sqrt deco' -> ' know of solution in sqrt deco'
en1 English rahul_1234 2017-12-15 16:56:39 246 Initial revision (published)