ac-library-rs icon indicating copy to clipboard operation
ac-library-rs copied to clipboard

Allow `RangeBounds` for fenwicktree, segtree, and lazysegtree

Open TonalidadeHidrica opened this issue 3 years ago • 1 comments

The rustic way to specify a certain range of a container is to use s..t notation. I changed the signature of FenwickTree::sum, Segtree::prod, and LazySegtree::prod so that they accept any range notation like .., s..t, s..=t, ..t and so on.

TonalidadeHidrica avatar Jun 21 '22 04:06 TonalidadeHidrica

Oh by the way, I forgot to change the signature of LazySegtree::apply_range too. I'll do it later.

TonalidadeHidrica avatar Jun 21 '22 04:06 TonalidadeHidrica