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

## Construct BST from its given level order traversal | Set-2

Construct the BST (Binary Search Tree) from its given level order traversal. Examples: Input : {7, 4, 12, 3, 6, 8, 1, 5, 10} Output… Read More »

## Flatten Binary Tree in order of Level Order Traversal

Given a Binary Tree, the task is to flatten it in order of Level order traversal of the tree. In the flattened binary tree, the… Read More »

## Density of Binary Tree using Level Order Traversal

Given a Binary Tree, find the density of it by doing one traversal of it. The density of binary tree is defined as: Density of… Read More »

## Difference between sums of odd position and even position nodes for each level of a Binary Tree

Given a Binary Tree, the task is to find the absolute difference between the sums of odd and even positioned nodes. A node is said… Read More »

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

Given a binary tree, print even positioned nodes of even level in level order traversal. The root is considered at level 0, and the left… Read More »

## Maximum sum of non-leaf nodes among all levels of the given binary tree

Given a Binary Tree having positive and negative nodes, the task is to find the maximum sum of non-leaf nodes among all level of given… Read More »

## Maximum sum of leaf nodes among all levels of the given binary tree

Given a Binary Tree having positive and negative nodes, the task is to find the maximum sum of leaf nodes among all level of the… Read More »