## Queries to find the count of integers in a range that contain the given pattern

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 »

- Kth smallest element in a subarray
- 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
- Count of quadruplets from range [L, R] having GCD equal to K
- Queries to find the last non-repeating character in the sub-string of a given string
- Queries for bitwise AND in the index range [L, R] of the given array
- Queries to check whether all the elements can be made positive by flipping signs exactly K times
- Maximum length palindrome that can be created with characters in range L and R
- Sum of all natural numbers from L to R ( for large values of L and R )
- Queries for bitwise OR in the index range [L, R] of the given array
- 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 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 »

Given an array arr[] of N and Q queries consisting of a range [L, R]. the task is to find the bit-wise AND of all… Read More »

Given an array arr[] of N and Q queries consisting of a range [L, R]. the task is to find the bit-wise OR of all… Read More »

Given an integer K and a range [L, R], the task is to count the quadruplet pairs from the given range having gcd equal to… Read More »

Given a string str and Q queries. Each query consists of two numbers L and R. The task is to find the maximum length palindrome… Read More »

Given an array arr[] of N integers and queries Q. Queries are of two types: Update a given index ind by X. Find the gcd… Read More »

Given an array arr[] of size n and q queries and an integer k. Each query consists of an index range [l, r] and the… Read More »