## Find a duplicate element in a limited range array

Given a limited range array of size n where array contains elements between 1 to n-1 with one element repeating, find the duplicate number in it.

Coding made easy

Given a limited range array of size n where array contains elements between 1 to n-1 with one element repeating, find the duplicate number in it.

Given a binary array, find the index of 0 to be replaced with 1 to get maximum length sequence of continuous ones.

Given an array of integers, print all sub-arrays with 0 sum.

Given an array of integers, move all zeros present in the array to the end. The solution should maintain the relative order of items in the array.

Given an array of integers containing duplicates, return the majority element in an array if present. A majority element appears more than n/2 times where n is the size of the array.

Given an array of integers, find equilibrium index in it.

Given an unsorted array of integers, find a pair with given sum in it.

Given an array containing only 0’s, 1’s and 2’s, sort the array in linear time and using constant space.

Given an array of integers, rearrange the array such that every second element of the array is greater than its left and right elements. Assume no duplicate elements are present in the array.

Given a BST and two nodes x and y in it, find lowest common ancestor (LCA) of x and y in it.

Given a Binary Tree, determine if it is a BST or not. This problem has a simple recursive solution. The BST property “every node on the right subtree has to be larger than the current node and every node on the left subtree has to be smaller than the current node” is the key …

Given an unsorted array of integers which represents binary search tree keys, construct a height balanced BST from it.