fenwick
v1.0.6
Published
A fenwick tree.
Downloads
16
Maintainers
Readme
Fenwick
npm package for fenwick tree.
Usage
import Fenwick from "fenwick";
const arr = [1, 2, 3, 4, 5];
const tree = new Fenwick(arr);
tree.sum(arr.length - 1); // 15
tree.update(0, 10);
// tree.sum(arr.length - 1) is now 25