Given an unsorted array of integers whose each element lies in range 0 to n-1 where n is the size of the array, calculate the frequency of all elements present in the array in linear time and using constant space. Get great deals at Amazon
Given a positive integer n, print all combination of numbers from 1 to n having sum n.
Given an array of distinct integers, replace each element of the array by its corresponding rank in the array.
Given an unsorted array of integers, print all triplets in it with sum less than or equal to given number.
Given an unsorted array of integers containing many duplicates elements, rearrange the given array such that same element appears together and relative order of first occurrence of each element remains unchanged.
Given two integers, find minimum difference between their index in a given array in linear time and single traversal of the array.
Given an array, find the maximum absolute difference between sum of elements of two non-overlapping sub-arrays in linear time.
Given an array of pairs of integers, find all symmetric pairs i.e. pairs that are mirror of each other. For instance, pairs (x, y) and (y, x) are mirrors of each other.
Given an array of integers, partition the array into two sub-arrays having the same sum of elements.
Given an array and an integer k, find the count of distinct elements in every sub-array of size k in the array.
Given an array of integers between 0 to 9, find two numbers with maximum sum formed by using all digits of the array. The difference in number of digits of the two numbers should be ± 1.
Given an array of integers, print all maximum size sub-arrays having all distinct elements in them.