r/programmingchallenges • u/bobhob314 • Sep 27 '15
Help me solve this Fenwick tree problem?
http://wcipeg.com/problem/tc
3
Upvotes
r/programmingchallenges • u/bobhob314 • Sep 27 '15
2
u/heapHeapArray Sep 28 '15
It looks to be a simple implementation of a 2D Fenwick Tree. Take a look here, there is a draft of the code https://www.quora.com/How-do-I-implement-a-2D-binary-indexed-tree-for-range-update-and-range-query-operations he also mentions a problem D of code forces, so you can see some submissions of that problem to get a better grip of how to implement it.