List data structure supporting prefix sums
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
res Move picture to res directory. Oct 18, 2017
LICENSE Initial commit May 14, 2017 Fix name of the programming language Mar 12, 2018
bench_test.go bench_test: Prefer ResetTimer over stop/start Mar 12, 2018
example_test.go Add doc example Oct 18, 2017
list.go Speed improvements May 16, 2017
list_test.go Speed improvements May 16, 2017

Your basic Fenwick tree GoDoc

Go 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


There is an online reference for the package at


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