## Count nodes with two children at level L in a Binary Tree

Given a Binary tree, the task is to count the number of nodes with two children at a given level L. Examples: Input: 1 /… Read More »

## Maximum sub-tree sum in a Binary Tree such that the sub-tree is also a BST

Given a binary tree, the task is to print the maximum sum of nodes of a sub-tree which is also a Binary Search Tree. Examples:… Read More »

## Construct Binary Tree from given Parent Array representation | Iterative Approach

Given an array that represents a tree in such a way that array indexes are values in tree nodes and array values give the parent… Read More »

## Create a mirror tree from the given binary tree

Given a binary tree, the task is to create a new binary tree which is a mirror image of the given binary tree. Examples: Input:… Read More »

## Check if the given binary tree has a sub-tree with equal no of 1’s and 0’s | Set 2

Given a tree having every node’s value as either 0 or 1, the task is to find whether the given binary tree contains any sub-tree… Read More »

## Largest sub-tree having equal no of 1’s and 0’s

Given a tree having every node’s value as either 0 or 1, the task is to find the maximum size of the sub-tree in the… Read More »

## Remove minimum elements from either side such that 2*min becomes more than max | Set 2

Given an unsorted array, trim the array such that twice of minimum is greater than the maximum in the trimmed array. Elements should be removed… Read More »

## Sum of nodes in bottom view of Binary Tree

Given a binary tree, the task is to print the sum of nodes in bottom view of the given Binary Tree. Bottom view of a… Read More »

## Clockwise Spiral Traversal of Binary Tree | Set – 2

Given a Binary Tree. The task is to print the circular clockwise spiral order traversal of the given binary tree. Examples: Input : 1 /… Read More »

## Reverse Anti Clockwise Spiral Traversal of a Binary Tree

Given a binary tree, the task is to print the nodes of the tree in a reverse anti-clockwise spiral manner. Examples: Input : 1 /… Read More »

## Print leaf nodes in binary tree from left to right using one stack

Given a binary tree, the task is to print all leaf nodes of the given binary tree from left to right. That is, the nodes… Read More »

## Minimum and maximum node that lies in the path connecting two nodes in a Binary Tree

Given a binary tree and two nodes a and b, the task is to print the minimum and the maximum node value that lies in… Read More »

## Print Binary Tree levels in sorted order | Set 3 (Tree given as array)

Given a Complete Binary Tree as an array, the task is to print all of its levels in sorted order. Examples: Input: arr[] = {7,… Read More »

## Sum of nodes in top view of binary tree

Top view of a binary tree is the set of nodes visible when the tree is viewed from the top. Given a binary tree, the… Read More »

## Check if two nodes in a Binary Tree are siblings

Given a binary tree and two nodes, the task is to check if the nodes are siblings of each other or not. Two nodes are… Read More »