Skip to content

Tag Archives: prefix-sum

Given an array arr[] and two integers L and R. The task is to find the sum of the product of all the pairs (i,… Read More
Given prefix sum array presum[] of an array. The task is to find the original array whose prefix sum is presum[].  Examples:  Input:  presum[] =… Read More
Given 2 arrays of integers a[] and s[] both of size N. The task is to find the maximum difference of prefix sum for all… Read More
Given an array arr[] of size N, the task is to maximize the difference of the sum of elements at even indices and elements at… Read More
Given a range [L, R], we need to find the count of total numbers of prime numbers in the range [L, R] where 0
Given a range [L, R], we need to find the count of total numbers of prime numbers in the range [L, R] where 0
Given a range [L, R], we need to find the count of total numbers of prime numbers in the range [L, R] where 0
Given a range [L, R], we need to find the count of total numbers of prime numbers in the range [L, R] where 0 Output:  … Read More
Given a range [L, R], we need to find the count of total numbers of prime numbers in the range [L, R] where 0 Output:  … Read More
Given a sorted array arr[] containing N pairs [A, B], wherer A is the position in X axis and B is the value on that… Read More
Given an array arr[] of integers of size N, the task is to maximize the sum of the array after removing valleys from the array… Read More
Given an array of n integers. You are given q queries. Write a program to print the floor value of mean in range l to… Read More
Given an array of n integers. You are given q queries. Write a program to print the floor value of mean in range l to… Read More
Given an array of n integers. You are given q queries. Write a program to print the floor value of mean in range l to… Read More
Given an array of n integers. You are given q queries. Write a program to print the floor value of mean in range l to… Read More

Start Your Coding Journey Now!