How I generalized segment trees by expressing range query outputs as elements of a monoid and update operations as functions.
How I generalized segment trees by expressing range query outputs as elements of a monoid and update operations as functions.