## Find the node whose xor with x gives minimum value

Given a tree, and the weights of all the nodes and an integer x, the task is to find a node i such that weight[i]… Read More »

## Connect all nodes to their Left Neighbors in a Binary Tree

Given a Binary Tree, where each node contains an extra empty pointer initially null. The task is to connect all nodes of the binary tree… Read More »

## Find the sum of leafs at maximum level

Given a binary tree containing n nodes. The task is to find the sum of all the leaf nodes present at maximum level. Examples: Input:… Read More »

## Maximum length cycle that can be formed by joining two nodes of a binary tree

Given a binary tree, the task is to find the maximum length of the cycle that can be formed by joining any two nodes of… Read More »

## Find the kth node in vertical order traversal of a Binary Tree

Given a binary tree and an integer k, the task is to print the kth node in the vertical order traversal of binary tree.If no… Read More »

## LCA in a tree using Binary Lifting Technique

Given a binary tree, the task is to find the Lowest Common Ancestor of the given two nodes in the tree. Let G be a… Read More »

## Iterative approach to check if a Binary Tree is Perfect

Given a Binary Tree, the task is to check whether the given Binary Tree is a perfect Binary Tree or not. A Binary tree is… Read More »

## Kth node in Diagonal Traversal of Binary Tree

Given a binary tree and a value K. The task is to print the k-th node in the diagonal traversal of the binary tree. If… Read More »

## Print all leaf nodes of a binary tree from right to left

Given a binary tree, the task is to print all the leaf nodes of the binary tree from right to left. Examples: Input : 1… Read More »

## Reverse alternate levels of a perfect binary tree using Stack

Given a Perfect Binary Tree, the task is to reverse the alternate level nodes of the binary tree. Examples: Input: a / \ b c… Read More »

## Recursive Program to Print extreme nodes of each level of Binary Tree in alternate order

Given a binary tree, the task is to print nodes of extreme corners of each level but in alternate order. Examples: Input : 1 /… Read More »

## Iterative approach to check for children sum property in a Binary Tree

Given a binary tree, write a function that returns true if the tree satisfies below property: For every node, data value must be equal to… Read More »

## Reverse Clockwise spiral traversal of a binary tree

Given a Binary Tree. The task is to print the circular reverse clockwise spiral order traversal of the given binary tree. Reverse Clockwise Traversal means… Read More »

## 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 »