Skip to content

Tag Archives: Binary Tree

Given a binary tree, the task is to find the distance between two keys in a binary tree, no parent pointers are given. The distance… Read More
Given a binary tree where each node can have at most two child nodes, the task is to find the Euler tour of the binary… Read More
Given a binary tree. Find if a given vertical level of the binary tree is sorted or not. (For the case when two nodes are overlapping,… Read More
Given a binary tree, find the vertical width of the binary tree. Width of a binary tree is the number of vertical paths. Examples:  Input… Read More
Given a binary tree, find the vertical width of the binary tree. The width of a binary tree is the number of vertical paths. In… Read More
Given an array that represents a tree in such a way that array indexes are values in tree nodes and array values give the parent… Read More
Given a binary tree in which nodes are numbered from 1 to n. Given a node and a positive integer K. We have to print… Read More
Given a binary tree and a node, we need to write a program to find inorder successor of this node.Inorder Successor of a node in… Read More
Given Preorder, Inorder, and Postorder traversals of some tree. Write a program to check if they all are of the same tree. Examples:  Input : Inorder… Read More
Given a binary tree, find the sum of all the leaf nodes.Examples:   Input : 1 / \ 2 3 / \ / \ 4 5… Read More
Given a Binary Tree, find sum of all right leaves in it. Similar article: Find sum of all left leaves in a given Binary TreeExample : … Read More
Given the binary Tree and the two nodes say ‘a’ and ‘b’, determine whether the two nodes are cousins of each other or not.Two nodes… Read More
It depends on what traversals are given. If one of the traversal methods is Inorder then the tree can be constructed, otherwise not. Therefore, following… Read More

Start Your Coding Journey Now!