Tag Archives: Binary Tree

Given a Binary Tree, the task is to find the smallest subtree that contains all the deepest nodes of the given Binary Tree and return… Read More
Given a Binary Tree consisting of N nodes, the task to find the maximum average of values of nodes of any subtree. Examples:  Input:   … Read More
Given a Binary Tree, the task is to remove the leaf nodes of the Binary Tree during each operation and print the count. Examples: Input:  … Read More
Given a Binary Tree, the task is to check if the given binary tree is a Binary Search Tree or not. If found to be… Read More
Prerequisite: Generic Trees(N-array Trees)  In this article, we will discuss the conversion of the Generic Tree to a Binary Tree. Following are the rules to… Read More
Given a Binary tree, the task is to print all possible root-to-leaf paths having a maximum number of even valued nodes. Examples: Input:  2 /… Read More
Given a Binary Tree, the task is to count the number of nodes in the Binary Tree, which are the highest valued node in the… Read More
Given a Binary Tree, the task is to check if it consists of node values arranged in strictly increasing order at even levels and strictly… Read More
Given a binary tree and an integer K, the task is to find the K smallest leaf nodes from the given binary tree. The number… Read More
Given a binary tree and an integer K, the task is to count the possible pairs of leaf nodes from the given binary tree such… Read More
Given a binary tree, check whether it is a mirror of itself. Examples: Input: 5 / \ 3 3 / \ / \ 8 9… Read More
Given a Binary Tree with N nodes valued 0 to N – 1 and N-1 edges and an array arr[] consisting of values of edges,… Read More
Given a Binary Tree and an integer D, the task is to check if the distance between all pairs of the same node values in… Read More
Given a Binary Tree, the task is to print all the root to leaf path sum of the given Binary Tree. Examples:  Input: 30 /… Read More
Given a Binary Tree, the task is to find the maximum value of GCD from any path from the root node to the leaf node.… Read More