How to quickly calculate range queries on arrays using prefix sum and sparse tables.
Interesting article Fernando!
What’s the idea behind having Range 4 and 8 beyond Range 2? What would be the application of this?
Thanks for mentioning my writing 🙂
Loved this breakdown, Fernando, super clear!
One thing that came to mind: in real-world systems, range queries don’t just live in algorithms; they hit storage too.
Things like Parquet files or data skipping indexes can really speed up scans.
It would be cool to hear your take on how these ideas play out when infrastructure comes into the picture.
Also, thanks for the mention!
Nice post
Is there a typo on the example demonstrated and explained?
> For example, to find the sum of elements from index 2 to 4 in our original array:
This says we need sum from 2 to 4, but we get it for 4 to 7?
Am I getting this wrong?
You're right. I missed the typo. I corrected it in the online version. Thanks for pointing out
Interesting article Fernando!
What’s the idea behind having Range 4 and 8 beyond Range 2? What would be the application of this?
Thanks for mentioning my writing 🙂
Loved this breakdown, Fernando, super clear!
One thing that came to mind: in real-world systems, range queries don’t just live in algorithms; they hit storage too.
Things like Parquet files or data skipping indexes can really speed up scans.
It would be cool to hear your take on how these ideas play out when infrastructure comes into the picture.
Also, thanks for the mention!
Nice post
Is there a typo on the example demonstrated and explained?
> For example, to find the sum of elements from index 2 to 4 in our original array:
This says we need sum from 2 to 4, but we get it for 4 to 7?
Am I getting this wrong?
You're right. I missed the typo. I corrected it in the online version. Thanks for pointing out