##
Smallest Difference Triplet from Three arrays
May 7, 2017

Three arrays of same size are given. Find a triplet such that maximum – minimum in that triplet is minimum of all the triplets. A… Read More »

May 7, 2017

Three arrays of same size are given. Find a triplet such that maximum – minimum in that triplet is minimum of all the triplets. A… Read More »

May 3, 2017

Prerequisites : BFS, DFS In BFS and DFS, when we are at a node, we can consider any of the adjacent as next node. So… Read More »

April 24, 2017

Given an array of strings. The array has both empty and non-empty strings. All non-empty strings are in sorted order. Empty strings can be present… Read More »

April 5, 2017

Given a linked list and a key in it, the task is to move all occurrences of given key to end of linked list, keeping… Read More »

March 30, 2017

In this post search, insert and delete operation in a sorted array is discussed. Search Operation In a sorted array, the search operation can be… Read More »

In this post search, insert and delete operation in an unsorted array is discussed. Search Operation In an unsorted array, the search operation can be… Read More »

February 26, 2017

Given an array of distinct elements. The task is to find triplets in array whose sum is zero. Examples: Input : arr[] = {0, -1,… Read More »

February 25, 2017

Given an array of distinct n integers. The task is to check whether reversing one sub-array make the array sorted or not. If the array… Read More »

February 22, 2017

We have an array of integers and we have to find two such elements in the array such that sum of these two elements is… Read More »

Given an array which contains integer values, we need to make all values of this array equal to some integer value with minimum cost where… Read More »

February 17, 2017

The name of this searching algorithm may be misleading as it works in O(Log n) time. The name comes from the way it searches an… Read More »

February 12, 2017

Consider n machines which produce same type of items but at different rate i.e., machine 1 takes a1 sec to produce an item, machine 2… Read More »

January 24, 2017

Given a number N. The task is to print all possible sums of consecutive numbers that add up to N. Examples: Input : 100 Output… Read More »

January 18, 2017

Given two linked lists, the task is to check whether the first list is present in 2nd list or not. Input : list1 = 10->20… Read More »

January 10, 2017

Given an array of n integers. Each array element is obtained by adding either +1 or -1 to previous element i.e absolute difference between any… Read More »