## Count of numbers from the range [L, R] which contains at least one digit that divides K

Given three positive integers L, R and K.The task is to find the count of all the numbers from the range [L, R] that contains… Read More »

- Queries for number of distinct elements in a subarray | Set 2
- Queries to check whether all the elements in the given range occurs even number of times
- Sum of all natural numbers from L to R ( for large values of L and R )
- Sum of numbers in a range [L, R] whose count of divisors is prime
- Range maximum query using Sparse Table
- Queries to find the count of integers in a range that contain the given pattern

Given three positive integers L, R and K.The task is to find the count of all the numbers from the range [L, R] that contains… Read More »

Given an array arr[] of N elements and a number of queries where each query will contain three integers L, R and K. For each… Read More »

Given an array of size N containing numbers only from 0 to 63, and you are asked Q queries regarding it. Queries are as follows:… Read More »

Consider an array A[] of integers and the following two types of queries. update(l, r, x): multiply x to all values from A[l] to A[r]… Read More »

Given Q queries and an integer K where each query consists of a range [L, R] and the task is to find the count of… Read More »

Given two integers L and R, the task is to find the minimum difference between any two prime numbers in the range [L, R]. Examples:… Read More »

Given a binary pattern patt and Q queries where each query consists of a range [L, R], for every query the task is to find… Read More »

Given Q queries where each query consists of an integer range [L, R], the task is to find the sum of the integers from the… Read More »

Given an array arr[], the task is to answer queries to find the maximum of all the elements in the index range arr[L…R]. Examples: Input:… Read More »

Given an array arr[] containing N integers and there are Q queries where each query consists of a range [L, R]. The task is to… Read More »

Given two very large numbers L and R where L ≤ R, the task is to compute the sum of all the natural numbers from… Read More »

Given an array arr[] of N integers and Q queries. Each query can be represented by two integers L and R. The task is to… Read More »

Given an array arr of size N. The task is to find the kth smallest element in the subarray(l to r, both inclusive). Note :… Read More »

Given an integer array arr[], and some queries consisting of an integer K, the task is to determine if its possible to make all the… Read More »

Given a string str, the task is to answer Q queries where every query consists of two integers L and R and we have to… Read More »