Data Structure that is able to perform this queries

Правка en2, от BlueDiamond, 2020-05-13 17:18:10

Hi!

Is there a data structure that can perform the following queries (in logaritmic time)?:

(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!

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский BlueDiamond 2020-05-13 17:18:10 21 Tiny change: 'ng queries?:\n\n(a) ' -> 'ng queries (in logaritmic time)?:\n\n(a) '
en1 Английский BlueDiamond 2020-05-13 17:15:48 290 Initial revision (published)