Question: Given an array of size N. All elements of array <= N. You need to answer M queries. Each query is of the form L, R. You need to answer the count of values in the range [L, R] which are repeated at least X times.
By MO's algorithm(BLOG), we all know that the approximate time complexity of queries will be sqrt(N)* Q.
I just wanted to know What will happen if we just randomize the query and proceed the queries. What will be approximate complexity of algorithm now? I want to understand the mathematics behind that as well.