Skip to content
UPEEC

Sparse Tables

Precomputed answers for power-of-two ranges giving $O(1)$ range-minimum queries on static arrays.

Advanced
Comments 0

Build O(nlog⁡n)O(n\log n); works for idempotent operations (min, max, gcd).

Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.

Discussion (0)

Sign in or join free to ask questions and discuss this topic.