# Tag Archives: Tree Traversals

## Check if the Binary Tree contains a balanced BST of size K

Given a Binary Tree and a positive integer K. The task is to check whether the Balanced BST of size K exist in a given… Read More »

## Check if the Left View of the given tree is sorted or not

Given a tree, our task is to check whether its left view is sorted or not. If it is then return true else false. Examples:… Read More »

## Lowest Common Ancestor for a Set of Nodes in a Rooted Tree

Given a rooted tree with N nodes, the task is to find the Lowest Common Ancestor for a given set of nodes V of that… Read More »

## Print all Coprime path of a Binary Tree

Given a Binary Tree, the task is to print all the co-prime paths of this tree. A path of a binary tree is said to… Read More »

## Boundary Level order traversal of a Binary Tree

Given a Binary Tree, the task is to print all levels of this tree in Boundary Level order traversal. Boundary Level order traversal: In this… Read More »

## Find the median array for Binary tree

Prerequisite: Tree Traversals (Inorder, Preorder and Postorder), Median Given a Binary tree having integral nodes, the task is to find the median for each position… Read More »

## Print all Palindromic Levels Of a Binary Tree

Given a Binary Tree, the task is to print all palindromic levels of this tree. Palindrom Level Any level of a Binary tree is said… Read More »

## Sideways traversal of a Complete Binary Tree

Given a Complete Binary Tree, the task is to print the elements in the following pattern. Let’s consider the tree to be: The tree is… Read More »

## Sum of all nodes at Kth level in a Binary Tree

Given a binary tree with N nodes and an integer K, the task is to find the sum of all the nodes present at the… Read More »

## Check if given Preorder, Inorder and Postorder traversals are of same tree | Set 2

Given Preorder, Inorder and Postorder traversals of some tree. The task is to check if they all are of the same tree. Examples: Input :… 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 »

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

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

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

## Print path between any two nodes in a Binary Tree

Given a Binary Tree of distinct nodes and a pair of nodes. The task is to find and print the path between the two given… Read More »