While solving NOV17 SEGPROD I stumbled upon this comment on codeforces. Talking about a Data Structure like Sparse Table that can answer range sum query in \theta(1). But the comment only talked about how to answer query in \theta(\log n).

Though my naive implementation of the \theta(\log n) approach did solve the problem without requiring many optimizations. I was wondering if anyone has heard of this DS before and knows the approach to solve it in \theta(1).