Concepts2
๐๏ธData StructureAdvanced
Segment Tree with Range Affine Transformation
A segment tree with lazy propagation can support range updates of the form x โ aยทx + b (affine transformations) and range-sum queries in O(log n) per operation.
#segment tree#lazy propagation#affine update+12
โ๏ธAlgorithmAdvanced
Matrix Exponentiation - Advanced
Matrix exponentiation turns repeated linear transitions into fast O(n^{3} log k) computation using exponentiation by squaring.
#matrix exponentiation#adjacency matrix#walk counting+12