## Replace array elements by sum of next two consecutive elements

Given an array arr[] of size n, The task is to replace every element of the array by the sum of next two consecutive elements… Read More »

- Make all numbers of an array equal
- Optimal Strategy for a Game | Set 2
- Sliding Window Maximum (Maximum of all subarrays of size k) using stack in O(n) time
- Sum of XOR of all subarrays
- Find k closest numbers in an unsorted array
- Count pairs in array whose sum is divisible by K
- Building Heap from Array
- Amazon Internship Interview Experience
- Program for K Most Recently Used (MRU) Apps
- Merge K sorted arrays | Set 3 ( Using Divide and Conquer Approach )
- Longest subsequence such that adjacent elements have at least one common digit
- k-th missing element in an unsorted array
- Minimum operations required to make all the array elements equal
- Count of pairs (x, y) in an array such that x < y
- Maximum sum such that no two elements are adjacent | Set 2
- Number of unique pairs in an array
- Check if given Preorder, Inorder and Postorder traversals are of same tree | Set 2
- Merge K sorted arrays of different sizes | ( Divide and Conquer Approach )
- Maximum element in a sorted and rotated array
- Length of the longest alternating subarray
- Minimum elements to be removed such that sum of adjacent elements is always even
- Given two arrays count all pairs whose sum is an odd number
- Array Manipulation and Sum
- Remove minimum elements from either side such that 2*min becomes more than max | Set 2
- Sort an array without changing position of negative numbers
- Count array elements that divide the sum of all other elements
- Create linked list from a given array
- Find minimum difference between any two elements | Set 2
- Find two numbers whose divisors are given in a random order
- Maximum absolute difference in an array

Given an array arr[] of size n, The task is to replace every element of the array by the sum of next two consecutive elements… Read More »

Given an array arr[] of N elements. The task is to find the minimum number of elements to be changed in the array such that… Read More »

Given an array arr[] of integers, the task is to find the minimum non-negative integer k such that there exists an index jin the given… Read More »

Given an integer k and an array arr[], the task is to count the number of sub-arrays which have the sum equal to some positive… Read More »

Given an array, arr[] and a function F(i, j). The task is to compute max{F(i, j)} over all sub-arrays [i..j]. The fucntion F() is defined… Read More »

Given an array arr[] containing only prime numbers, the task is to check if the product of the array elements is a perfect square or… Read More »

Given an array of N elements. The task is to find the maximum number of the contiguous automorphic numbers in the given array. Automorphic Numbers:… Read More »

Given a binary circular array of size N, the task is to find the count maximum number of consecutive 1’s present in the circular array.… Read More »

Given an array of N integers which denotes the edges of N cubical structures respectively. Also given are M integers which denotes the number of… Read More »

Given an array of n integers, we have to partition the array into three segments such that all the segments have equal sum. Segment sum… Read More »

Given an array arr[] of size N consisting of distinct integers from range [0, N – 1] arranged in a random order. Also given a… Read More »

Given an array that represents a tree in such a way that array indexes are values in tree nodes and array values give the parent… Read More »

Given two arrays arr1[] and arr2[] of sizes N and M where 0 ≤ arr1[i], arr2[i] ≤ 1000 for all valid i, the task is… Read More »

Given an array arr[] of size n. The task is to count the number of possible sub-arrays such that their elements can be re-arranged to… Read More »

Given an array of positive and negative elements. The task is to replace every i-th element of the array by the absolute difference of absolute… Read More »