List data structure supporting prefix sums
A Fenwick tree, or binary indexed tree, is a space-efficient list data structure that can efficiently update elements and calculate prefix sums in a list of numbers.
Once you have installed Go, run this command
to install the fenwick
package:
go get github.com/yourbasic/fenwick
There is an online reference for the package at godoc.org/github.com/yourbasic/fenwick.
The only accepted reason to modify the API of this package is to handle issues that can't be resolved in any other reasonable way.
Stefan Nilsson – korthaj