OmaeWaMouShenDeiru's blog

By OmaeWaMouShenDeiru, 9 years ago, In English

Hey, some problems that requires cumulative frequencies asks for range update and range queries.

This problem in it's simplest form can be solved using segment tree with lazy propagation.

It can also be solved using binary indexed tree, but using it here differs from using it with range update and point query, or point update and range query.

Now I read couple of articales about it, but they all give a breef explanation about direct solution only, that two BITs needed.

I still can't understand why this problem occers and how was this solution invented.

Can someone please explain this topic.

Thanks :D

Edit: This is a link to one of the explanations for this problem.

Tags bit
| Write comment?
»
9 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

I don't know how helpful it will be, but check this out http://coutcode.com/blog/binaryindexedtree/

Edit: Well, if I shared it, why not ask some feedback on the article? :)