# Tag Archives: array-range-queries

Given a 2-dimensional integer array arr[] representing N ranges, each of type [starti, endi] (starti, endi ≤ 109) and Q queries represented in array query[],… Read More
Given an array arr[] of length N, and an array queries[] of size Q, the task is to find the number of missing elements from… Read More
Given an array consisting of N positive integers, and Q queries where each query is one of the following types: 1 l r – Requires… Read More
Given an array arr[ ] which contains N positive integers and an integer K and a vector of queries Q . Two types of queries… Read More
Given an array arr[] of size N, an integer K and Q queries, each of form {x, l, r}. For each query, the task is… Read More
Consider an integer sequence S, which is initially empty (i.e. S = {}). Also given are Q queries, each of which is one of the… Read More
Given array of integers arr[] and queries[] of size N and Q, the task is to find the largest index for each query Q[i] such… Read More
Given an array arr[] of size N, and Q queries of the form [A, B], the task is to find all the unique elements from… Read More
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