github.com/yourbasic/fenwick (go): Package fenwick provides a 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.  Compared to a common array, a Fenwick tree achieves better balance between element update and prefix sum calculation – both operations run in O(log n) time – while using the same amount of memory. This is achieved by representing the list as an implicit tree, where the value of each node is the sum of the numbers in that subtree.  Compute the sum of the first 4 elements in a list.
Keywords: data-structure|fenwick-tree|go|prefix-sum