Given a Binary Tree, the task is to print all Co-prime levels of this tree. Any level of a Binary tree is said to be… Read More

# Tag Archives: tree-level-order

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

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

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

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

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

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

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

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

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

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

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 as: … Read More

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

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

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