## Lowest Common Ancestor in Parent Array Representation

Given a binary tree represented as parent array, find Lowest Common Ancestor between two nodes ‘m’ and ‘n’. In the above diagram, LCA of 10… Read More »

- Convert a given Binary Tree to Circular Doubly Linked List | Set 2
- Calculate height of Binary Tree using Inorder and Level Order Traversal
- Flatten Binary Tree in order of Level Order Traversal
- Count all k-sum paths in a Binary Tree
- Check if the given n-ary tree is a binary tree
- Find the Deepest Node in a Binary Tree Using Queue STL - SET 2
- Print all the nodes except the leftmost node in every level of the given binary tree
- Sum of nodes in the left view of the given binary tree
- Convert ternary expression to Binary Tree using Stack
- Flatten binary tree in order of post-order traversal
- Duplicate subtree in Binary Tree | SET 2
- Find the color of given node in an infinite binary tree
- Find Maximum Level Sum in Binary Tree using Recursion
- Sum of nodes in the right view of the given binary tree
- Maximum XOR with given value in the path from root to given node in the tree
- Number of ways to divide a Binary tree into two halves
- Flatten Binary Tree in order of Zig Zag traversal
- Delete the last leaf node in a Binary Tree
- Convert a given Binary tree to a tree that holds Logical OR property
- Sink even nodes in Binary Tree
- Difference between General tree and Binary tree
- Skewed Binary Tree
- Extended Binary Tree

Given a binary tree represented as parent array, find Lowest Common Ancestor between two nodes ‘m’ and ‘n’. In the above diagram, LCA of 10… Read More »

Given two binary trees. The task is to write a program to check if the two trees are identical in structure. In the above figure… Read More »

Given a Binary Tree, find the maximum sum in a binary tree by adding the parent with its children. Exactly three Node needs to be… Read More »

Given a BT and a key Node, find the total sum in BT, except those Node which are adjacent to key Node. Examples: Recommended: Please… Read More »

Round 1: Coding round + MCQs There were 2 coding questions and 20 mcqs of variable marks such as 4, 6 and 2 and no… Read More »

Consider you have an infinitely long binary tree having a pattern as below: 1 / \ 2 3 / \ / \ 4 5 6… Read More »

Given a binary tree and data value of a node. The task is to find the sum of cousin nodes of given node. If given… Read More »

A recursive and a non-recursive program to delete an entire binary tree has already been discussed in the previous posts. In this post, deleting the… Read More »

Given a binary tree and a node, print all cousins of given node. Note that siblings should not be printed. Examples: Input : root of… Read More »

Given a binary tree and 3 nodes a, b and c, the task is to find a node in the tree such that after removing… Read More »

Given a binary tree, print the level order traversal in such a way that first two levels are printed from left to right, next two… Read More »

Given a root node to a tree, find the sum of all the leaf nodes which are at maximum depth from root node. Example: 1… Read More »

Given a binary tree, flatten it into linked list in-place. Usage of auxiliary data structure is not allowed. After flattening, left of each node should… Read More »

Given a binary tree and the two nodes say ‘a’ and ‘b’, determine whether two given nodes are cousins of each other or not. Two… Read More »

Given two binary trees, the task is to check whether the two binary trees is a mirror of each other or not. Mirror of a… Read More »