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

# Tag Archives: Binary Tree

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

Given a Binary Tree where each node has a value of either 0 or 1, the task is to convert the given Binary tree to… Read More

Given the root of a binary tree in which all nodes has values 0 or 1, the task is to find and print all levels… Read More

Given the root of a binary tree in which all nodes has values either 0 or 1, the task is to check if the level-wise… Read More

Given a binary tree and an integer K, the task is to print the level order traversal in such a way that first K levels… Read More

Given two binary tree with same structure but may have different arrangement of value and given an integer K. The task is to check that… Read More

Geek has developed an effective vaccine for the Coronavirus and he wants each of the N houses in Geek Land to have access to it.… Read More

Given two binary trees T1 and T2 and integer K, the task is to check whether both trees are identical or not after making exactly… Read More

Given two binary trees, check if the first tree is a subtree of the second one. A subtree of a tree T is a tree… Read More