Data Structure that is able to perform this queries

Revision en1, by BlueDiamond, 2020-05-13 17:15:48

Hi!

Is there a data structure that can perform the following queries?:

(a) for (i = 1; i <= n; i++) A[i] += B[i]

(b) given l and r perform for (i = l; i <= r; i++) B[i] = C

(c) given i, return the value of A[i]

Thanks!

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English BlueDiamond 2020-05-13 17:18:10 21 Tiny change: 'ng queries?:\n\n(a) ' -> 'ng queries (in logaritmic time)?:\n\n(a) '
en1 English BlueDiamond 2020-05-13 17:15:48 290 Initial revision (published)