In a Red-Black Tree, the maximum height of a node is at most twice the minimum height
Given a Binary Tree and a positive integer k, print all nodes that are distance k from a leaf node.
Find the distance between two keys in a binary tree, no parent pointers are given.
Given a binary tree (not a binary search tree) and two values say n1 and n2, write a program to find the least common ancestor.
Given a Binary Tree, print all nodes that don’t have a sibling (a sibling is a node that has same parent. In a Binary Tree,… Read More »
Given a Binary Tree (BT), convert it to a Doubly Linked List(DLL) In-Place. The left and right pointers in nodes are to be used as… Read More »
Given a binary tree, where every node value is a Digit from 1-9 .Find the sum of all the numbers which are formed from root… Read More »
Given a Binary tree and a key in the binary tree, find the node right to the given key. If there is no node on… Read More »
Given a Binary Tree, find the deepest leaf node that is left child of its parent. For example, consider the following tree. The deepest left… Read More »
Given a Binary Tree, extract all leaves of it in a Doubly Linked List (DLL).
Given a binary tree, a complete path is defined as a path from root to a leaf. The sum of all nodes on that path… Read More »
Given a Binary Tree, print left view of it. Left view of a Binary Tree is set of nodes visible when tree is visited from… Read More »
Given a Binary Tree, check if all leaves are at same level or not.
Write a C code to get the depth of the deepest odd level leaf node in a binary tree. Consider that level starts with 1.
Given Inorder and Preorder traversals of a binary tree, print Postorder traversal.