Competitive programming in Haskell: sparse tables Posted on July 18, 2025 Tagged monoid , semigroup , idempotent , range , query , sum , sparse , table , Haskell , competitive programming Share on Continuing a series of posts on techniques for calculating range queries , today I will present the sparse table data structure , for doing fast range queries on a static sequence with an idempotent…