# Tag Archives: Binary Tree

Given a 2D integer array where each row represents the relation between the nodes (relation[i] = [parenti, childi, isLefti]). The task is to construct the… Read More
Given a perfect binary tree of height N  and an array of length 2N which represents the values of leaf nodes from left to right.… Read More
Given a binary tree and an integer K, the task is to write a program to count the number of nodes such that the path… Read More
Given a binary tree and a node start that is initially infected. For every second, neighbours of an infected node get infected. The task is… Read More
Given a binary tree and a target K, the task is to find the diameter of the minimum subtree having sum equal to K which… Read More
Given a Binary Tree (BT), convert it to a Doubly Linked List (DLL). The left and right pointers in nodes are to be used as… Read More
What is a Perfect Binary Tree? A perfect binary tree is a special type of binary tree in which all the leaf nodes are at… Read More
Given an integer N, the task is to generate a perfect binary tree with height N such that each node has a value that is… Read More
A binary tree is a tree that has at most two children for any of its nodes. There are several types of binary trees. To… Read More
A height-balanced binary tree is defined as a binary tree in which the height of the left and the right subtree of any node differ… Read More
Given a binary tree, a target node and a positive integer K on it,  the task is to find the sum of all nodes within… Read More
A binary tree is a type of data structure where each node can only have two offspring at most named as “left” and “right” child.… Read More
Given a binary tree, the task is to print all the nodes of the binary tree in Pre-order, Post-order, and In-order in one iteration. Examples:… Read More
Given a full binary tree where each node value is the same as the minimum value between its children, the task is to find the… Read More
Given a directed binary tree of N nodes whose edges are directed from the parent to the child, the task is to count the number… Read More