## Count of natural numbers in range [L, R] which are relatively prime with N

Given three integers N, L, and R. The task is to calculate the number of natural numbers in the range [L, R] (both inclusive) which… Read More »

- Dynamic Segment Trees : Online Queries for Range Sum with Point Updates
- XOR of elements in a given range with updates using Fenwick Tree
- Sum and Maximum of elements in array from [L, R] before and after updates
- Maximum pair sum in the given index ranges of an Array
- Number of ways to obtain each numbers in range [1, b+c] by adding any two numbers in range [a, b] and [b, c]
- Query to find the maximum and minimum weight between two nodes in the given tree using LCA.
- Range sum queries for anticlockwise rotations of Array by K indices
- Find K-th smallest element in an array for multiple queries
- Count numbers divisible by K in a range with Fibonacci digit sum for Q queries
- Array range queries to count the number of Fibonacci numbers with updates
- Find the XOR of the elements in the given range [L, R] with the value K for a given set of queries
- Sum of elements of an AP in the given range
- Binary Array Range Queries to find the minimum distance between two Zeros
- Sum of product of proper divisors of all Numbers lying in range [L, R]
- Range Queries for number of Armstrong numbers in an array with updates
- Count of divisors of product of an Array in range L to R for Q queries
- Array Range Queries to find the Maximum Armstrong number with updates
- Count of distinct colors in a subtree of a Colored Tree with given min frequency for Q queries
- Queries for the count of even digit sum elements in the given range using Segment Tree.
- Query to count odd and even parity elements in subarray after XOR with K
- Queries to find kth smallest element and point update : Ordered Set in C++
- Sum of all Perfect numbers lying in the range [L, R]
- Maximum sum after rearranging the array for K queries
- Maximum weighted edge in path between two nodes in an N-ary tree using binary lifting
- Count of pairs in a given range with sum of their product and sum equal to their concatenated number
- Sum of numbers in the Kth level of a Fibonacci triangle
- Find sum of product of every number and its frequency in given range
- Queries for greatest pair sum in the given index range using Segment Tree
- Numbers with a Fibonacci difference between Sum of digits at even and odd positions in a given range
- Array range queries to find the number of perfect square elements with updates

Given three integers N, L, and R. The task is to calculate the number of natural numbers in the range [L, R] (both inclusive) which… Read More »

Given two numbers L and R, the task is to find the prime numbers between L and R. Examples: Input: L = 1, R =… Read More »

Given an array integer arr[] of size N and Q queries. Each query is of the form (L, R), where L and R are indices… Read More »

Given a string S of length N, and Q queries of the following type: Type 1: 1 i X Update the i-th character of the… Read More »

Given two positive integers L and R, the task is to find out the total number of values between range [L, R] such that the… Read More »

Given an array arr[] of size N, and Q queries of the form {i, k} for which, the task is to print the most frequent… Read More »

Given an integer array arr[] of size N, and Q queries of the form of {L, R, X}, the task is to find the smallest… Read More »

Given an array arr[] of N positive integers and the number of queries Q, each query contains two numbers L and R. The task is… Read More »

Given an integer array arr[] and Q queries, the task is to find the sum of the array for each query of the following type:… Read More »

Given an array arr[] of N elements and Q queries of the form [X]. For each query, the task is to find the largest interval… Read More »

Given an array arr[] of positive integers and two integers L and R, the task is to find the sum of all multiples of the… Read More »

Given two integers N and M, the task is to print all elements in the range [N, M] having at least one odd divisor. Examples:… Read More »

Given an array arr[] of size N and Q queries of the form [L, R], the task is to find the number of distinct values… Read More »

Given an array arr[] and an integer K, the task is to find the minimum number of operations required to change an array B of… Read More »

Given a sorted array arr[], and a set Q having M queries, where each query has values X and Y, the task is to find… Read More »