# Tag Archives: array-range-queries

Given a range [L, R] and an integer K, the task is to check if it is possible to make the GCD of all integersâ€¦ Read More
Given a binary matrix of size NxN which is initially filled with 0’s and Q queries such that: Each query is of type (r, c)â€¦ Read More
Given a range [L, R), the task is to count the numbers that remain unchanged when rotated 180 degrees clockwise. Examples: Input: L = 0,â€¦ Read More
Given three values, N, L and R, the task is to calculate the sum of binomial coefficients (nCr) for all values of r from Lâ€¦ Read More
Given a binary string S of size N, and a 2D array Q[][] of queries consisting of M pairs of the form {L, R}, theâ€¦ Read More
Given integers L and R, find all numbers in range L to R whose digits are increasing-decreasing alternatively i.e. if the digits in the currentâ€¦ Read More
Given an array arr consisting of N elements and Q queries of the following two types:   1 K: For this type of query, the arrayâ€¦ Read More
Given an array arr consisting of N elements and Q queries of the following two types:   1 K: For this type of query, the arrayâ€¦ Read More
Given an array arr consisting of N elements and Q queries of the following two types:   1 K: For this type of query, the arrayâ€¦ Read More
Given an array arr consisting of N elements and Q queries of the following two types:   1 K: For this type of query, the arrayâ€¦ Read More
Given an array arr[] and two integers L and R. The task is to find the sum of the product of all the pairs (i,â€¦ Read More
Given an array arr[] of size N where each element denotes a pair in the form (price, weight) denoting the price and weight of eachâ€¦ Read More
Given two integers L and R. The task is to count the prime numbers in the range [L, R], whose single sum is also aâ€¦ Read More
Given a number N, the task is to find the longest range of integers [L, R] such that 1 â‰¤ L â‰¤ R â‰¤ Nâ€¦ Read More
The query-based questions of competitive programming are mainly of two types: Offline Query. Online Query.  Offline Query An offline algorithm allows us to manipulate theâ€¦ Read More