##
Check if a given Binary Tree is height balanced like a Red-Black Tree
February 27, 2014

In a Red-Black Tree, the maximum height of a node is at most twice the minimum height

February 27, 2014

In a Red-Black Tree, the maximum height of a node is at most twice the minimum height

February 25, 2014

Given a Binary Tree and a positive integer k, print all nodes that are distance k from a leaf node.

February 23, 2014

Find the distance between two keys in a binary tree, no parent pointers are given.

February 22, 2014

Given a binary tree (not a binary search tree) and two values say n1 and n2, write a program to find the least common ancestor.

February 20, 2014

Given a Binary Tree, print all nodes that don’t have a sibling (a sibling is a node that has same parent. In a Binary Tree,… Read More »

February 17, 2014

Given a Binary Tree (BT), convert it to a Doubly Linked List(DLL) In-Place. The left and right pointers in nodes are to be used as… Read More »

January 21, 2014

Given a binary tree, where every node value is a Digit from 1-9 .Find the sum of all the numbers which are formed from root… Read More »

December 18, 2013

Given a Binary tree and a key in the binary tree, find the node right to the given key. If there is no node on… Read More »

December 1, 2013

Given a Binary Tree, find the deepest leaf node that is left child of its parent. For example, consider the following tree. The deepest left… Read More »

October 4, 2013

Given a Binary Tree, extract all leaves of it in a Doubly Linked List (DLL).

September 24, 2013

Given a binary tree, a complete path is defined as a path from root to a leaf. The sum of all nodes on that path… Read More »

August 30, 2013

Given a Binary Tree, print left view of it. Left view of a Binary Tree is set of nodes visible when tree is visited from… Read More »

August 27, 2013

Given a Binary Tree, check if all leaves are at same level or not.

August 24, 2013

Write a C code to get the depth of the deepest odd level leaf node in a binary tree. Consider that level starts with 1.

August 22, 2013

Given Inorder and Preorder traversals of a binary tree, print Postorder traversal.