# Tag Archives: Segment-Tree

Given an array A[] of length N, where N is an even number, the task is to answer Q independent queries where each query consists… 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 Armstrong numbers in… Read More
Given an array arr[] of N integers, the task is to perform the following two queries:  maximum(start, end): Print the maximum Armstrong number of elements… 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 perfect square numbers… Read More
Given an array arr[] and an integer K, the task is to find the maximum for each and every contiguous subarray of size K. Examples: … Read More
Given an array arr[] of N integers and Q queries, each query having two integers L and R, the task is to find the element… Read More
Given an array arr[] of N integers, the task is to perform the following two queries:  query(L, R): Print the number of Even Parity numbers… Read More
Given an array arr[] of N integers, the task is to perform the following two queries:  maximum(start, end): Print the maximum Fibonacci number of elements… Read More
Prerequisite: Segment Trees, Lazy Propagation in Segment Tree. Given an array arr[] of N integers. The task is to do the following operations: Change the… Read More
Given an array arr[] containing N integers and an array Q[] representing the range [L, R], the task is to find the greatest pair sum… Read More
Given an array of N integers, the task is to perform the following two operations on the given array:   query(L, R): Print the number of… Read More
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 1… 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