Tag Archives: tree-level-order

Given a Binary Tree of positive integers. The task is to convert it to a BST using left shift operations on the digits of the… Read More
Given an integer N which denotes the number of slots, and an array arr[] consisting of K integers in the range [1, N] repreand. Each… Read More
Given a Binary Tree, the task is to replace the value of each node with the sum of all the nodes present in the same… Read More
Given a Binary Tree consisting of 0s and 1s only, the task is to print the count of levels in the Binary Tree in which… Read More
Given a Binary Tree, the task is to find the most frequent subtree sum that can be obtained by considering every node of the given… Read More
Given an N-ary tree and an element X, the task is to print the siblings of the node with value X. Two nodes are considered… Read More
Given a N-ary Tree consisting of nodes valued in the range [0, N – 1] and an array arr[] where each node i is associated… Read More
Given an N-ary Tree consisting of nodes valued [1, N] and an array value[], where each node i is associated with value[i], the task is… Read More
Given an array arr[] representing a Generic(N-ary) tree. The task is to replace the node data with the depth(level) of the node. Assume level of… Read More
Given a Binary Tree, the task is to perform Specific Level Order Traversal of the tree such that at each level print 1st element then… Read More
Given a Binary Tree, the task is to check if the maximum sum level divides the binary tree into the two parts of two equal… Read More
Given a binary tree, the task is to traverse the Binary Tree in level order fashion. Examples: Input: 1 / \ 2 3 Output: 1… Read More
Given a Binary Tree having positive and negative nodes, the task is to find the maximum absolute difference of level sum in it. Examples:  Input:… Read More
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
Given a number K, the task is to create the Diamond-like structure of Tree which follows these two conditions:   First K levels of the tree… Read More