## Find whether a subarray is in form of a mountain or not

We are given an array of integers and a range, we need to find whether the subarray which falls in this range has values in… Read More »

We are given an array of integers and a range, we need to find whether the subarray which falls in this range has values in… Read More »

Given an array, we need to find two subarrays with a specific length K such that sum of these subarrays is maximum among all possible… Read More »

Given an array of n numbers and a number k. We need to divide the array into k partitions (clusters) of same or different length.… Read More »

Given an Array, three operations can be performed using any external number x. Add x to an element once Subtract x from an element once… Read More »

Given an array of n distinct positive integers. The task is to find the minimum number of elements to be removed such that no three… Read More »

Given two arrays of integers, compute the pair of values (one value in each array) with the smallest (non-negative) difference. Return the difference. Examples: Input… Read More »

Write a program to input a list of integers in an array and arrange them in a way similar to the to-and-fro movement of a… Read More »

Given an array of n positive distinct integers. The problem is to find the largest sum of contiguous increasing subarray in O(n) time complexity. Examples:… Read More »

Introduction and Implementation : Given an array arr[] of size n, its prefix sum array is another array prefixSum[] of same size such that the… Read More »

Given an array ‘arr1’ of n positive integers. Contents of arr1[] are copied to another array ‘arr2’, but numbers are shuffled and one element is… Read More »

Three arrays of same size are given. Find a triplet such that maximum – minimum in that triplet is minimum of all the triplets. A… Read More »

Given an array, the task is to find average of that array. Average is the sum of array elements divided by the number of elements.… Read More »

Given an array of size n, write a program to check if it is sorted in ascending order or not. Equal values are allowed in… Read More »

Given two positive integer n and n. The task is to find the number of arrays of size n that can be formed such that… Read More »

Given a set of integers, check whether there is a subsequence with odd sum and if yes, then finding the maximum odd sum. If no… Read More »