Struct competitive_programming_rs::data_structure::fenwick_tree::fenwick_tree::FenwickTree[][src]

pub struct FenwickTree<T, F> { /* fields omitted */ }
Expand description

FenwickTree is a data structure that can efficiently update elements and calculate prefix sums in a table of numbers. https://en.wikipedia.org/wiki/Fenwick_tree

Implementations

Constructs a new FenwickTree. The size of FenwickTree should be specified by size.

Returns a sum of range [l, r)

Returns a sum of range [0, k)

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.