# Category Archives: Tree

Given a Binary Tree, the task is to count the number of nodes in the given Binary Tree such that the path from the root… Read More
Given a Binary Tree consisting of N nodes rooted at 1, an integer K and an array arr[] consisting of values assigned to each node,… 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 for each level L is to print the Lth node of the tree. If the Lth node is not… 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, the task is to check if the binary tree is an Even-Odd binary tree or not.  A Binary Tree is called… Read More
Given a Binary Tree, the task is to find the sum of all the specially balanced nodes in the given Binary Tree. A specially balanced… Read More
Given a Binary Tree, the task is to print the middle nodes of each level of a binary tree. Considering M to be the number… 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 n-ary tree T, the task is to find a node whose removal minimizes the maximum size of all forests(connected components) generated. Examples: Input:  … Read More
Given a binary tree, the task is to count the number of balanced nodes in the given tree. Balanced nodes of a binary tree are… Read More
Given a binary tree, the task is to traverse each level of the given binary tree from left to right and print every alternate encountered… Read More
Given a Binary Search Tree, the task is to print the nodes of the BST in the following order: If the BST contains levels numbered… Read More
Given an undirected graph G with N nodes, M edges, and an integer K, the task is to find the maximum count of edges that… Read More