Range Queries
How to quickly calculate range queries on arrays using prefix sum and sparse tables.
Hi Friends,
Welcome to the 126th issue of the Polymathic Engineer newsletter.
This week, we discuss some interesting data structures that can be used to efficiently run range queries on arrays. In particular, we will mostly talk about range sum queries (which add up all the elements in a range) and range minimum queries (which find the lowest element).
Th…