From bb6394176bf2d8498bd76bc24146b134e63ce24d Mon Sep 17 00:00:00 2001 From: Pratik Yadav <93317361+ypratik817@users.noreply.github.com> Date: Fri, 20 Dec 2024 16:48:42 +0530 Subject: [PATCH] Update sqrt_decomposition.md --- src/data_structures/sqrt_decomposition.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data_structures/sqrt_decomposition.md b/src/data_structures/sqrt_decomposition.md index 772038a19..9de18621f 100644 --- a/src/data_structures/sqrt_decomposition.md +++ b/src/data_structures/sqrt_decomposition.md @@ -120,7 +120,7 @@ But in a lot of situations this method has advantages. During a normal sqrt decomposition, we have to precompute the answers for each block, and merge them during answering queries. In some problems this merging step can be quite problematic. E.g. when each queries asks to find the **mode** of its range (the number that appears the most often). -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. +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. **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. The idea is to answer the queries in a special order based on the indices. pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy