# Tag Archives: array-range-queries

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
Given two integers L and R, the task is to count the integers in the range [L, R] such that they satisfy the following two… Read More
Given an array arr[] of N integers and Q queries of the form (l, r). The task is to find the number of distinct pairs… Read More
Given an array arr[] of N integers and an array query[] having Q integers, the task is to print the array arr[] after moving the… Read More
Given an array queries[][] of Q range queries, the task is to find the minimum removals from the range[l, r] such that the bitwise AND… Read More
Given a range [L, R], we need to find the count of total numbers of prime numbers in the range [L, R] where 0 <=… Read More