## Queries for the count of even digit sum elements in the given range using Segment Tree.

Given an array arr[] of N elements, the task is to answer Q queries each having two integers L and R. For each query, the… Read More »

- Queries for elements having values within the range A to B in the given index range using Segment Tree
- Dynamic Segment Trees : Online Queries for Range Sum with Point Updates
- Sum of prime numbers in range [L, R] from given Array for Q queries
- Queries to check if any non-repeating element exists within range [L, R] of an Array
- Lexicographical smallest number after at most K consecutive swaps
- Range Sum and Update in Array : Segment Tree using Stack
- 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
- Range Queries for number of Armstrong numbers in an array with updates
- Array range queries to count the number of Fibonacci numbers with updates
- Maximum of all subarrays of size K using Segment Tree
- Binary Array Range Queries to find the minimum distance between two Zeros
- Array Range Queries to find the Maximum Armstrong number with updates
- Queries for greatest pair sum in the given index range using Segment Tree
- Queries for the count of even digit sum elements in the given range using Segment Tree.
- Count of divisors of product of an Array in range L to R for Q queries
- Find array sum using Bitwise OR after splitting given array in two halves after K circular shifts
- Find the element having maximum set bits in the given range for Q queries
- Array range queries to find the number of perfect square elements with updates
- Maximum distance between two 1s in a Binary Array in a given range
- Count of distinct numbers in an Array in a range for Online Queries using Merge Sort Tree
- Array Range Queries to count Powerful numbers with updates
- Range Queries to count the number of even parity values with updates
- Range Queries to find the Element having Maximum Digit Sum
- Array range queries to find the maximum Fibonacci number with updates
- Range Update Queries to XOR with 1 in a Binary Array.

Given an array arr[] of N elements, the task is to answer Q queries each having two integers L and R. For each query, the… Read More »

Given an array Arr of N integers and Q queries, each query having a range from L to R. Find the element having maximum digit… Read More »

Given a binary array arr[] of size N. The task is to answer Q queries which can be of any one type from below: Type… Read More »

Given an array arr[] of N elements and two integers A to B, the task is to answer Q queries each having two integers L… Read More »

Given an array arr[] of N integers, the task is to perform the following two queries: query(start, end): Print the number of fibonacci numbers in… 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 divisors of… Read More »

Prerequisites: Segment Tree Given a number N which represents the size of the array initialized to 0 and Q queries to process where there are… Read More »

Prerequisite: Segment Trees Given a binary array arr[] consisting of only 0’s and 1’s and a 2D array Q[][] consisting of K queries, the task… Read More »

Given an array arr containing N positive integers and the number of queries Q, for each query task is to find the maximum pair sum… Read More »

Given a binary array of size N and a range in [l, r], the task is to find the maximum distance between two 1s in… Read More »

Given an array arr[] of N integers. The task is to do the following operations: Add a value X to all the element from from… Read More »

Prerequisite: Segment tree and depth first search. In this article, an approach to convert an N-ary rooted tree( a tree with more than 2 children)… Read More »

Given an integer array arr and a number K, the task is to find the length of longest subarray such that all the elements in… Read More »

Given an array of n non-consecutive integers and Q queries, the task is to check whether for the given range l and r, the elements… Read More »

Given an array arr[] of length N, the task is to find the number of strictly increasing sub-sequences in the given array. Examples: Input: arr[]… Read More »