Skip to main content

One doc tagged with "precomputation"

View all tags

Prefix Sums

Prefix sums (cumulative sums) are a foundational technique for speeding up range queries. They extend beyond arrays into matrices, trees, and even XOR or product computations, forming the backbone of many algorithmic optimizations.