Skip to content

Tag Archives: Binary Tree

The tree is a hierarchical Data Structure. A binary tree is a tree that has at most two children. The node which is on the… Read More
Given a Binary Tree consisting of N nodes, the task is to print the Level Order Traversal after replacing the value of each node with… Read More
In this article, we will discuss the approach to create an E-Library Management System where the user has the following options: Add book information. Display… Read More
Given a Binary Tree consisting of N nodes and a integer K, the task is to find the depth and height of the node with… Read More
Given an infinite complete binary tree rooted at node 1, where every ith node has two children, with values 2 * i and 2 *… Read More
Given an N-ary Tree consisting of N nodes valued from [1, N], where node 1 is the root, the task is to count the pairs… Read More
Given a binary tree consisting of either 1 or 0 as its node values, the task is to find the sum of all vertical levels… Read More
Given a Binary Tree with each node representing an alphabet, the task is to find lexicographically smallest palindromic root to leaf path. If no palindromic… 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 iteratively using only one… Read More
Given a Binary Tree consisting of N nodes, the task is to count the number of levels in a Binary Tree such that the set… Read More
Given a Binary Tree and an integer target, denoting the value of a node, the task is to find the sum of distances of all… Read More
Given a binary tree consisting of N nodes, the task is to find the sum of depths of all subtree nodes in a given binary… Read More
Given two Binary trees and two integer keys K1, K2 where both K1, K2 can be present in the same tree or in different trees.… Read More
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