##
Merge two BSTs with limited extra space
June 1, 2012

Given two Binary Search Trees(BST), print the elements of both BSTs in sorted form. The expected time complexity is O(m+n)

June 1, 2012

Given two Binary Search Trees(BST), print the elements of both BSTs in sorted form. The expected time complexity is O(m+n)

March 30, 2012

You are given two balanced binary search trees e.g., AVL or Red Black Tree. Write a function that merges the two given balanced BSTs into a balanced binary search tree.

February 17, 2012

Given a Binary Tree, write a function that returns the size of the largest subtree which is also a Binary Search Tree (BST). If the complete Binary Tree is BST, then return the size of whole tree.

January 18, 2012

Given a sorted array. Write a function that creates a Balanced Binary Search Tree using array elements.

January 17, 2012

Given a Singly Linked List which has data members sorted in ascending order. Construct a Balanced Binary Search Tree which has same data members as the given Linked List.

March 3, 2011

Given two values k1 and k2 (where k1 < k2) and a root pointer to a Binary Search Tree. Print all the keys of tree in range k1 to k2. i.e. print all x such that k1

February 15, 2011

Given root of binary search tree and K as input, find K-th smallest element in BST.

February 11, 2011

In Binary Tree, Inorder successor of a node is the next node in Inorder traversal of the Binary Tree. Inorder Successor is NULL for the last node in Inoorder traversal.

December 13, 2010

Given an array that stores a complete Binary Search Tree, write a function that efficiently prints the given array in ascending order.

May 26, 2010

Total number of possible Binary Search Trees with n different keys = Catalan number Cn = (2n)!/(n+1)!*n!

November 21, 2009

A binary search tree (BST) is a node based binary tree data structure which has the following properties.