##
Advantages of BST over Hash Table
April 1, 2015

Hash Table supports following operations in Θ(1) time.

April 1, 2015

Hash Table supports following operations in Θ(1) time.

March 31, 2015

Given an unsorted array with repetitions, the task is to group multiple occurrence of individual elements. The grouping should happen in a way that the order of first occurrences of all elements is maintained.

December 29, 2014

Given an unsorted array that may contain duplicates. Also given a number k which is smaller than size of array. Write a function that returns true if array contains duplicates within k distance.

November 21, 2014

Given two sets represented by two arrays, how to check if the given two sets are disjoint or not? It may be assumed that the given arrays have no duplicates.

October 19, 2014

Given an array of integers, find length of the longest subarray which contains numbers that can be arranged in a continuous sequence.

September 15, 2014

Given an array of integers, find the first repeating element in it. We need to find the element that occurs more than once and whose index of first occurrence is smallest.

September 2, 2014

Given a Binary Tree where every node has following structure. struct node { int key; struct node *left,*right,*random; } The random pointer points to any random node of the binary tree and can even point to NULL, clone the given binary tree.

April 11, 2014

Given a binary tree, print it vertically. The following example illustrates vertical order traversal.

April 2, 2014

Given an array of positive and negative numbers, find if there is a subarray (of size at-least one) with 0 sum.

June 26, 2012

Given an array containing only 0s and 1s, find the largest subarray which contain equal no of 0s and 1s. Expected time complexity is O(n).

February 29, 2012

Given a Binary Tree, find vertical sum of the nodes that are in same vertical line. Print all sums through different vertical lines.