## Divide the array into minimum number of sub-arrays having unique elements

Given an array arr. The task is to divide the array into the minimum number of subarrays containing unique elements and return the count of… Read More »

- Sliding Window Maximum (Maximum of all subarrays of size k) using stack in O(n) time
- Optimal Strategy for a Game | Set 2
- Find k closest numbers in an unsorted array
- Create linked list from a given array
- Check if given Preorder, Inorder and Postorder traversals are of same tree | Set 2
- Maximum Sum Subsequence of length k
- Maximum sum such that no two elements are adjacent | Set 2
- Sort an array without changing position of negative numbers
- Kth smallest element in a subarray
- Introduction to Data Structures | 10 most commonly used Data Structures
- Given two arrays count all pairs whose sum is an odd number
- Count the triplets such that A[i] < B[j] < C[k]
- Find maximum xor of k elements in an array
- 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
- 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
- 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
- Maximum sum combination from two arrays
- Flip minimum signs of array elements to get minimum sum of positive elements possible
- Remove duplicates from unsorted array using Set data structure
- Maximum water that can be stored between two buildings
- Pair with largest sum which is less than K in the array
- Iterative approach to print all permutations of an Array
- Find the smallest positive number missing from an unsorted array : Hashing Implementation
- Find a triplet in an array whose sum is closest to a given number

Given an array arr. The task is to divide the array into the minimum number of subarrays containing unique elements and return the count of… Read More »

Given an array arr[] of size N and an integer K, the task is to find the number of K length subsequences of this array… Read More »

Given an array arr[] of N integers, the task is to find the probability of getting the maximum sum pair (arr[i], arr[j]) from the array… Read More »

Given an array of length N + K. Also given the average avg of all the elements of the array. If an element that appears… Read More »

Given an array arr[] of N non-negative integers, the task is to sort these integers according to the product of their digits. Examples: Input: arr[]… Read More »

Given an array arr[] of N integers, the task is to sort the array in non-decreasing order by performing the minimum number of operations. In… Read More »

Given an array A[] of N integers, the task is to generate an array B[] such that B[i] contains the count of indices j in… Read More »

Given an array arr[]. The task is t find the value of X such that the result of the expression (A[1] – X)^2 + (A[2]… Read More »

Given a list of integers from the range [1, N] with some of the elements missing. The task is to find the missing elements. Note… Read More »

Given a binary pattern patt and Q queries where each query consists of a range [L, R], for every query the task is to find… Read More »

Given an array of size N. The task is to find the product of values of all possible non-empty subsets of the given array. Examples:… Read More »

Given task is to implement a class in C++ which behaves just like the Vector class. Vectors are same as dynamic arrays with the ability… Read More »

Given an array of non-negative integers arr[], the task is to find a pair (n, r) such that nPr is maximum possible and r ≤… Read More »

Given an array arr[] of N integers, the task is to find the sum of values of all possible non-empty subsets of array the given… Read More »

Given an array of non-negative integers arr[]. The task is to find a pair (n, r) such that value of nCr is maximum possible r… Read More »