## Water drop problem

Consider a pipe of length L. The pipe has N water droplets at N different positions within it. Each water droplet is moving towards the… Read More »

Consider a pipe of length L. The pipe has N water droplets at N different positions within it. Each water droplet is moving towards the… Read More »

Given two arrays arr1[] and arr2[] sorted in ascending order and an integer K. The task is to find k pairs with smallest sums such… Read More »

Given an array of N elements. The task is to print the maximum number by concatenating every element in each rotation. In every rotation, the… Read More »

Given a sequence of N elements, only three operations can be performed on any element at most one time. The operations are: Add one to… Read More »

Given an array of 2 * N positive integers where each array element lies between 1 to N and appears exactly twice in the array.… Read More »

Given an array of N elements where the first element is a non zero positive number M, and the rest N – 1 elements are… Read More »

Given an unsorted array of length N and we have to find largest gap between any two elements of array.In simple words, find max(|Ai-Aj|) where… Read More »

Given an array of size 2 * N integers. Divide the array into N pairs, such that the maximum pair sum is minimized. In other… Read More »

Given programs stored on a computer tape and length of each program is where , find the order in which the programs should be stored… Read More »

A hotel manager has to process N advance bookings of rooms for the next season. His hotel has K rooms. Bookings contain an arrival date… Read More »

Given a set of ‘n’ vertices and ‘m’ edges of an undirected simple graph (no parallel edges and no self-loop), find the number of single-cycle-components… Read More »

Given an array a, your task is to convert it into a non-increasing form such that we can either increment or decrement the array value… Read More »

Given an array, task is to compute the sum of all possible maximum area rectangle which can be formed from the array elements. Also, you… Read More »

Consider the given array arr[], we need to find if we can sort array with given operation. We are only allowed to reverse subarray such… Read More »

There are n student groups at the school. On each day in school, there are m time slots. A student group may or may not… Read More »