Disjoint Sparse Table
Data structure for arrays of semi-groups that supports range queries.
__init__
Arguments
A: list[T]: array of the semi-groupdot: Callable[[T, T], T]: binary operation of the semi-group
Complexities
- time:
- space:
prod
Calculates the product of .
Arguments
l: int: left endpoint of the range (inclusive)r: int: right endpoint of the range (exclusive)
Returns
T:
