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. The use of any other operator is forbidden.
Given an array of integers, find minimum index of a repeating element in linear time and doing just one traversal of the array.
Given N lists of words, print all combinations of phrases that can be formed by picking one word each from each of the given lists.
Given a linked list, rearrange it by separating odd nodes from even ones. All even nodes should come before all odd nodes in the output list and the relative order of even and odd nodes should be maintained.
Given an integer, reverse its bits using binary operators and lookup table in O(1) time.
Write an algorithm to generate any one of the given N numbers according to given probabilities.
Given a binary tree, find maximum difference between a node and its descendants in it.
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.
In this post, we will discuss how to generate fair results from a biased coin which prefer one side of the coin over another, and returns TAILS with p probability and HEADS with (1-p) probability
Given an array of integers, check if an array is formed by consecutive integers.