dsa8 min read
Square Root Decomposition: O(sqrt n) Range Queries Without Segment Trees
Master square root decomposition for range sum, range minimum, and Mo's algorithm. The simplest range-query data structure that beats brute force for competitive programming and interviews.
Read →