## Median of Stream of Running Integers using STL

Given that integers are being read from a data stream. Find median of all the elements read so far starting from the first integer till… Read More »

Given that integers are being read from a data stream. Find median of all the elements read so far starting from the first integer till… Read More »

Given a stream of characters and we have to find first non repeating character each time a character is inserted to the stream. Examples: Input… Read More »

Given a stack of integers, sort it in ascending order using another temporary stack. Examples: Input : [34, 3, 31, 98, 92, 23] Output :… Read More »

There are n houses build in a line, each of which contains some value in it. A thief is going to steal the maximal value… Read More »

A sorted array contains 6 different numbers, only 1 number is repeated five times. So there are total 10 numbers in array. Find the duplicate… Read More »

Given a positive integer n that represents dimensions of a 4n x 4n matrix with values from 1 to n filled from left to right… Read More »

Given an array and a range [lowVal, highVal], partition the array around the range such that array is divided in three parts. 1) All elements… Read More »

Given a dictionary, a method to do lookup in dictionary and a M x N board where every cell has one character. Find all possible… Read More »

Given an even number (greater than 2 ), print two prime numbers whose sum will be equal to given number. There may be several combinations… Read More »

Given a value n, find out the largest palindrome number which is product of two n digit numbers. Examples : Input : n = 2… Read More »

A surpasser of an element of an array is a greater element to its right, therefore x[j] is a surpasser of x[i] if i <… Read More »

Job Profile : System Engineer (on Campus) Round-1: Pen and paper test was conducted.There were about 30 MCQ’s. 4 aptitude and 26 technical questions.Technical questions… Read More »

Given a stack, sort it using recursion. Use of any loop constructs like while, for..etc is not allowed. We can only use the following ADT… Read More »

Two trains are on same track and they are coming toward each other. The speed of first train is 50 KMs/h and the speed of… Read More »

Serialization is to store tree in a file so that it can be later restored. The structure of tree must be maintained. Practice Tags :… Read More »