# Tag Archives: tree-level-order

## Print all Prime Levels of a Binary Tree

Given a Binary Tree, the task is to print all prime levels of this tree. Any level of a Binary tree is said to be… 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 »

## Construct a Binary in Level Order using Recursion

Given an array of integers, the task is to construct a binary tree in level order fashion using Recursion. Examples Given an array arr[] =… Read More »

## Largest number possible by arranging node values at each level

Given a Binary Tree with positive values at each node, the task is to print the maximum number that can be formed by arranging nodes… Read More »

## Print all nodes except rightmost node of every level of the Binary Tree

Given a binary tree, the task is to print all the nodes except the rightmost in every level of the tree. The root is considered… Read More »

## Deletion of a given node K in a Binary Tree using Level Order Traversal

Given a binary tree and a node K, the task is to delete the node K from it by making sure that tree shrinks from… 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 »

## Print characters and their frequencies in order of occurrence using Binary Tree

Given a string str containing only lowercase characters. The problem is to print the characters along with their frequency in the order of their occurrence… Read More »

## Remove vowels from a string stored in a Binary Tree

Given a binary tree in such a way such that the level order traversal of a binary tree produces a string S. The task is… Read More »

## Build Binary Tree from BST such that it’s level order traversal prints sorted data

Construct a Binary Tree from the given Binary Search Tree such that it’s level order traversal outputs sorted data. Examples: Input: Output: 1 2 3… Read More »

## Vertical Zig-Zag traversal of a Tree

Given a Binary Tree, the task is to print the elements in the Vertical Zig-Zag traversal order. Vertical Zig-Zag traversal of a tree is defined… Read More »

## Check if the level order traversal of a Binary Tree results in a palindrome

Given a binary tree and the task if to check if it’s level order traversal results in a palindrome or not. Examples: Input: Output: Yes… Read More »

## Calculate height of Binary Tree using Inorder and Level Order Traversal

Given Inorder traversal and Level Order traversal of a Binary Tree. The task is to calculate the height of the tree without constructing it. Example:… Read More »

## Print odd positioned nodes of odd levels in level order of the given binary tree

Given a binary tree, the task is to print the odd positioned nodes of odd levels in the level order traversal of the tree. The… Read More »

## Insertion in n-ary tree in given order and Level order traversal

Given a set of parent nodes where the index of the array is the child of each Node value, the task is to insert the… Read More »