## Find next right node of a given key

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 »

## Deepest left leaf node in a binary tree

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 »

## Extract Leaves of a Binary Tree in a Doubly Linked List

Given a Binary Tree, extract all leaves of it in a Doubly Linked List (DLL). Note that the DLL need to be created in-place. Assume… Read More »

## Remove all nodes which don’t lie in any path with sum>= k

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 »

## Add all greater values to every node in a given BST

Given a Binary Search Tree (BST), modify it so that all greater values in the given BST are added to every node. For example, consider… Read More »

## Print Left View of a Binary Tree

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 »

## Check if all leaves are at same level

Given a Binary Tree, check if all leaves are at same level or not. 12 / \ 5 7 / \ 3 1 Leaves are… Read More »

## Find depth of the deepest odd level leaf node

Write a code to get the depth of the deepest odd level leaf node in a binary tree. Consider that level starts with 1. Depth… Read More »

## Print Postorder traversal from given Inorder and Preorder traversals

Given Inorder and Preorder traversals of a binary tree, print Postorder traversal. Example: Input: Inorder traversal in[] = {4, 2, 5, 1, 3, 6} Preorder… Read More »

## Difference between sums of odd level and even level nodes of a Binary Tree

Given a a Binary Tree, find the difference between the sum of nodes at odd level and the sum of nodes at even level. Consider… Read More »

## Convert a given Binary Tree to Doubly Linked List | Set 2

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

## Custom Tree Problem

You are given a set of links, e.g. a —> b b —> c b —> d a —> e Print the tree that would… Read More »

## Iterative Method to find Height of Binary Tree

There are two conventions to define the height of a Binary Tree 1) Number of nodes on the longest path from the root to the… Read More »

## Tree Isomorphism Problem

Write a function to detect if two trees are isomorphic. Two trees are called isomorphic if one of them can be obtained from other by… Read More »

## Convert a given Binary Tree to Doubly Linked List | Set 1

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