Fenwick Tree, N unique elements which may have values greater than N

Правка en2, от jaswanthi, 2015-08-06 13:11:31

Given an Array N unique elements ,and some elements may contain values greater than N.

For ex: 1, 8, 2147483647 instead of building huge fenwick array.

We can try for 1,2,3, which has mapping 1 <--> 1, 2 <--> 8, 3 <--> 2147483647

To work on Fenwick Tree, we need to adjust that to a 1 — N range. Is there a way to do this ?

Теги fenwick, binary search, array

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский jaswanthi 2015-08-06 22:17:18 123
en2 Английский jaswanthi 2015-08-06 13:11:31 156 Tiny change: ' than N.\nFor ex: ' -
en1 Английский jaswanthi 2015-08-06 13:06:35 262 Initial revision (published)