Given a binary tree, the task is to find all minimum values greater than or equal to zero, that should be added at each level… Read More

# Tag Archives: Binary Tree

Given a Binary tree, the task is to trim this tree for any subtree containing only 0s. Examples: Input: 1 \ 0 / \ 0… Read More

Given an array pre[], representing the Preorder traversal of a Perfect Binary Tree consisting of N nodes, the task is to construct a Perfect Binary… Read More

Given a Binary Tree, the task is to print the Bottom-left to Upward-right Traversal of the given Binary Tree i.e., the level order traversal having… Read More

Given a binary tree, the task is to compress all the nodes on the same vertical line into a single node such that if the… Read More

Given an integer N, the task is to print all possible Full Binary Trees with N nodes. The value at the nodes does not contribute… Read More

Given two arrays, A[] and B[] consisting of M pairs, representing the edges of the two binary trees of N distinct nodes according to the… Read More

Given a Binary Tree consisting of N nodes, the task is to find the maximum width of the given tree where the maximum width is… Read More

Generating Random Unweighted Binary Tree: Since this is a tree, the test data generation plan is such that no cycle gets formed. The number of… Read More

Given a Binary Tree consisting of N nodes having values in the range [0, N – 1] rooted as 0, an array wt[] of size… Read More

Given a Binary Tree consisting of N nodes, the task is to replace each node of the tree with the product of all the remaining… Read More

Given a Binary Tree consisting of N nodes, the task is to find the minimum number of cameras required to monitor the entire tree such… Read More

The dstructure package is a Python library for dealing with data structure and algorithm. In this article, we will discuss how we can implement a… Read More

The tree is a hierarchical Data Structure. A binary tree is a tree that has at most two children. The node which is on the… Read More

Given a Binary Tree consisting of N nodes, the task is to print the Level Order Traversal after replacing the value of each node with… Read More