## Maximum sum subarray such that start and end values are same

Given an array of N positive numbers, the task is to find a contiguous subarray (L-R) such that a[L]=a[R] and sum of a[L] + a[L+1]… Read More »

- Remove duplicates from unsorted array
- MakeMyTrip Interview Experience 2019
- Design a Hit Counter
- Make all numbers of an array equal
- Count distinct elements in an array
- Reach the numbers by making jumps of two given lengths
- How do Dynamic arrays work?
- Check whether an Array is Subarray of another Array
- Largest palindromic number in an array
- Program for K Most Recently Used (MRU) Apps
- Rearrange Odd and Even values in Alternate Fashion in Ascending Order
- Sum of all odd frequency elements in an array
- Coviam Software Developer Internship Experience
- Sum of XOR of all subarrays
- Sum of minimum elements of all subarrays
- Minimum operations required to make all the array elements equal
- Length of the longest Subarray with only Even Elements
- Longest subsequence such that adjacent elements have at least one common digit
- Print all pairs in an unsorted array with equal sum
- A Sum Array Puzzle
- Minimum elements to be removed such that sum of adjacent elements is always even
- Count of pairs (x, y) in an array such that x < y
- Number of pairs whose sum is a power of 2
- Maximum of all Subarrays of size k using set in C++ STL
- Merge K sorted arrays | Set 3 ( Using Divide and Conquer Approach )
- Count array elements that divide the sum of all other elements
- Length of the longest alternating subarray
- Smallest Pair Sum in an array
- Number of array elements derivable from D after performing certain operations
- k-th missing element in an unsorted array

Given an array of N positive numbers, the task is to find a contiguous subarray (L-R) such that a[L]=a[R] and sum of a[L] + a[L+1]… Read More »

Given an array arr, the task is to find the sum of the elements which have prime frequencies in the array. Note: 1 is neither… Read More »

Given two integers N and K, the task is to generate a permutation of N numbers (Every number from 1 to N occurs exactly once)… Read More »

Given an array of n integers. The task is to find the largest number which is not a perfect cube. Print -1 if there is… Read More »

Given an array of N elements, the task is to convert it into a permutation (Each number from 1 to N occurs exactly once) by… Read More »

Given an array of N integers, the task is to find the number of pairs (i, j) such that A[i] ^ A[j] is even. Examples:… Read More »

Given an array of integers, find the closest (not considering distance, but value) greater or same value on left of every element. If an element… Read More »

Given an array of N integers. The task is to find the largest number which is a perfect cube. Print -1 if there is no… Read More »

Given an integer K and an array arr containing only 1 and -1, the task is to find if there is any subset of size… Read More »

Given an array arr[] of integer elements, the task is to find the total number of sub-sets of arr[] in which product of the elements… Read More »

Given an array of distinct elements, the task is to find the total number of two element pairs from the array whose sum is a… Read More »

Given two arrays A[] and B[] consisting of and integers. The task is to check whether the array B[] is a subarray of the array… Read More »

Given an array of N positive elements. The task is to find an element which is equal to the sum of all elements of array… Read More »

Given two integers and and an array arr[] every element of which at index is calculated as arr[i] = i * (-1)i. The task is… Read More »

Given an array of integers. The task is to sort the given array on the basis increasing count of distinct prime factors. Examples: Input :… Read More »