Skip to content

Tag Archives: Binary Tree

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 binary tree in which each of the internal nodes has exactly two child… 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
Given, a binary tree, the task is to convert this tree using minimum number of increment-decrement operations into a tree which satisfies the following conditions:… Read More
Given a binary tree, the task is to: Print all the leaf nodes and then delete them all.  Repeat this process till the tree becomes… Read More

Start Your Coding Journey Now!