Skip to content

Commit bb63941

Browse files
authored
Update sqrt_decomposition.md
1 parent 7397078 commit bb63941

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/data_structures/sqrt_decomposition.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ But in a lot of situations this method has advantages.
120120
During a normal sqrt decomposition, we have to precompute the answers for each block, and merge them during answering queries.
121121
In some problems this merging step can be quite problematic.
122122
E.g. when each queries asks to find the **mode** of its range (the number that appears the most often).
123-
For this each block would have to store the count of each number in it in some sort of data structure, and we cannot longer perform the merge step fast enough any more.
123+
For this each block would have to store the count of each number in it in some sort of data structure, and we can no longer perform the merge step fast enough any more.
124124
**Mo's algorithm** uses a completely different approach, that can answer these kind of queries fast, because it only keeps track of one data structure, and the only operations with it are easy and fast.
125125

126126
The idea is to answer the queries in a special order based on the indices.

0 commit comments

Comments
 (0)