(help) Range updates + range queries on how many occurrences

Revision en2, by babin, 2019-06-14 00:17:27

Suppose we are given a constant c in the beginning and an array. We have range updates(add a value on a range) and range queries(how many occurrences of c are there in a given range?). Is it possible to effectively perform these queries? I know how to do that for counting the number of minimums/maximums, but I'm not sure if there is a way do that for a constant c given in the beginning. Thanks in advance.

Tags data structures

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English babin 2019-06-14 00:17:27 19 Tiny change: ' not sure how to do that f' -> ' not sure if there is a way do that f'
en1 English babin 2019-06-14 00:10:45 470 Initial revision (published)