Given an array of integers, print all maximum size sub-arrays having all distinct elements in them.
Given an array of integers, find a triplet having maximum product in the array.
Write a program to count number of ways to calculate a target number from elements of specified array by using only addition and subtraction operator.
Given an array of integers, find minimum index of a repeating element in linear time and doing just one traversal of the array.
Write an algorithm to generate any one of the given N numbers according to given probabilities.
Given an sorted array of integers, find a pair in it having minimum absolute sum.
Given a collection of integers, develop an algorithm to find the index of maximum occurring element with equal probability.
Given an array of integers, check if an array is formed by consecutive integers.
Given an unsorted array of integers, find two non-overlapping pairs in it having same sum.
Given a sequence of numbers such that the difference between the consecutive terms is constant, find missing term in it in log(n) time.
Given a set S, generate all distinct subsets of it i.e., find distinct power set of set S. A power set of any set S is the set of all subsets of S, including the empty set and S itself.
Given a sorted array of integers, find floor and ceil of a given number in it. The floor and ceiling map the given number to the largest previous or the smallest following integer, respectively.