Given an array arr[] of the size of N followed by an array of Q queries, of the following two types: Query Type 1: Given… Read More
Tag Archives: Segment-Tree
Given an array arr[] consisting of integers and queries Q of the form (L, R), the task is to check whether any non-repeating element is… Read More
Given a number in form of string str and an integer K, the task is to find the smallest integer that can be formed after… 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 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: 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[] 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