## Minimum sum of array elements based on given Criteria

Given an array A[] of size N with entries as integers, some of the entries are -1. The task is to replace -1’s with numbers… Read More »

- Optimal Strategy for a Game | Set 2
- Sliding Window Maximum (Maximum of all subarrays of size k) using stack in O(n) time
- Building Heap from Array
- Find k closest numbers in an unsorted array
- Amazon Internship Interview Experience
- Check if given Preorder, Inorder and Postorder traversals are of same tree | Set 2
- Create linked list from a given array
- Maximum sum such that no two elements are adjacent | Set 2
- Maximum Sum Subsequence of length k
- Sort an array without changing position of negative numbers
- Maximum absolute difference in an array
- Maximum element in a sorted and rotated array
- Given two arrays count all pairs whose sum is an odd number
- Find maximum xor of k elements in an array
- Kth smallest element in a subarray
- Count the triplets such that A[i] < B[j] < C[k]
- Find the longest string that can be made up of other strings from the array
- Find minimum difference between any two elements | Set 2
- Partition an array of non-negative integers into two subsets such that average of both the subsets is equal
- Introduction to Data Structures | 10 most commonly used Data Structures
- Count of integers of length N and value less than K such that they contain digits only from the given set
- Number of subsets with zero sum
- Split the given array into K sub-arrays such that maximum sum of all sub arrays is minimum
- Maximum sum combination from two arrays
- Greatest contiguous sub-array of size K
- Remove duplicate elements in an Array using STL in C++
- Find the smallest positive number missing from an unsorted array | Set 3
- Minimum cost to reach end of array array when a maximum jump of K index is allowed
- Find the minimum number of operations required to make all array elements equal
- Pair with largest sum which is less than K in the array

Given an array A[] of size N with entries as integers, some of the entries are -1. The task is to replace -1’s with numbers… Read More »

Given 21 Matchsticks and 2 users, A and B (computer and user respectively). Users can pick matchsticks not more than four at a time. The… Read More »

Given an array arr[] of size 10 where arr[i] represents the frequency of the digit i. The task is to find the smallest positive number… Read More »

Given an array arr[] of size N. The task is to find the sum of the digits of all array elements which contains even number… Read More »

Given an array of N elements where each element i, the absolute difference between total elements to the right and left of it are given.… Read More »

Let represent the ordered pair of the second maximum and the maximum element of an array respectively. We need to find all such unique pairs… Read More »

Given an array, find the number of subsequences whose sum is even and the number of subsequences whose sum is odd. Example : Input: arr[]… Read More »

Given an unsorted array of integers, print the array after removing the duplicate elements from it. We need to print distinct array elements according to… Read More »

Given an array arr of size N and a number K. The task is to find the minimum elements to be replaced in the array… Read More »

Given an array arr[] of size N. The task is to find smaller elements on the right side and greater elements on the left side… Read More »

Given a list or array of integer, the task is to print all such subsequences of this list such in which the elements are arranged… Read More »

Given an array of strings, we need to sort the array in increasing order of string lengths, using Map Data Structure. Examples: Input: str[] =… Read More »

Given an array arr[] of size N( > 2). The task is to find the maximum sum of digits of the product of any two… Read More »

Given an array arr of size N. The task is to count number of triplets in the array such that a[i]>a[j]>a[k] and i<j<k Examples: Input… Read More »

Given a number N. The task is to find the minimum number of binary strings required to represent the given number as the sum of… Read More »