Data structure for fast query and update of cumulative sums


Version on this page:0.1.2
LTS Haskell 20.25:
Stackage Nightly 2023-06-10:
Latest on Hackage:

See all snapshots FenwickTree appears in

BSD-3-Clause licensed by Michal J. Gajda
This version can be pinned in stack with:FenwickTree-0.1.2@sha256:c90a3b69ef145829be416c0ede4a9489960c5e73f2c05976eb8d7553a23a3cc5,1533

Module documentation for 0.1.2

  • Data
    • Data.Tree
      • Data.Tree.Fenwick


Build Status

Fenwick trees are a O(log N) data structure for updating cumulative sums. This implementation comes with an operation to find a least element for which real-valued cumulative sum reaches certain value, and allows for storage of arbitrary information in the nodes.

See description on Wikipedia.

Official releases are on Hackage.

This package is also a part of Stackage - a stable subset of Hackage.