**Objective:** **– **Given Binary Tree, Print **all the nodes which are X distance from the root**

Example :

**Appraoch:**

Read morePrint All The Nodes Which are X distance from the Root

**Objective:** **– **Given Binary Tree, Print **all the nodes which are X distance from the root**

Example :

**Appraoch:**

Read morePrint All The Nodes Which are X distance from the Root

**Objective:** **– **Find The Distance From Root To Given Node of a binary tree.

*What does Distance means :** It means number of edges between two nodes.*

**Approach****:**

Read moreFind The Distance From Root To Given Node of a Binary Tree.

**Objective:** **– **Find the Lowest Common Ancestor of two given nodes in a Binary Search Tree

*What is Lowest Common Ancestor*

*In a given binary tree, The lowest common ancestor of two nodes n1 and n2 will be a node X such that node X will be the lowest node who has n1 and n2 as its descendants.*

**Similar Problem**: Lowest Common Ancestor in a Binary Tree ( Not Binary Search Tree).

**Example**:

**Input:** A binary Search Tree and two nodes n1 and n2.

**Appraoch:**

**Objective:** **– **Find the maximum sum leaf to root path in a Binary Tree. Means in all the paths from root to leaves, find the path which has the maximum sum.

**Input:** A binary tree

**Example:**

Read moreGiven a binary tree, find out the maximum sum of value from root to each leaf.

**Objective:** **– **Reverse Alternate levels of a given binary tree

**Input:** A binary tree

**Example:**

**Appraoch:**

** Given a Sorted Array, Convert it into its Balanced Binary search TreeObjective:** You have been given a sorted singly List, you need to convert it into balanced binary search tree.

*Why balanced binary tree is important: *

*You can also create the first node as root and insert all other nodes to the right of the tree because List is in increasing order but this constructed tree won’t be a balanced tree, it will be the skewed tree and to perform operations on this tree will be O(n), not O(logn).*

**Input:** An sorted Singly Linked List

**Output: **Balanced Binary Tree

**Example:**

**Approach:**

Read moreGiven a Sorted Singly Linked List Array, Convert it into a Balanced Binary search Tree.

**Objective:** Given a sorted doubly linked list, convert it into Balanced binary search tree

**Input:** A Doubly Linked List

**Example:**

**Approach:**

Read moreConvert a Sorted Doubly Linked List to Balanced BST.

**Objective:** Given a binary tree, Find the maximum path sum from one leaf node to another.

**Input:** A binary tree.

**Example:**

**Approach:**

Read moreGiven a binary tree, Find the Maximum Path Sum between Any Two Leaves

**Objective:** In a Binary Tree, print left view of it

**Input:** A binary tree.

*What is left View of a binary Tree*

When just look at the tree from the left side , all the nodes you can see will be the left view of the tree.

**Example:**

**Approach****:**

**Objective:** In a Binary Tree, print right view of it

**Input:** A binary tree.

*What is Right View of a binary Tree?*

*When just look at the tree from the right side , all the nodes you can see will be the right view of the tree.*

**Example:**

**Approach :**

**Method 1 : **

**Objective:** In a Binary Tree, Check if Two nodes has the same parent or are siblings

**Input:** A binary tree and two nodes

**Example:**

**Approach:**

Read moreIn a Binary Tree, Check if Two nodes has the same parent or are siblings

**Objective:** Given a binary tree and two nodes, Check if they are cousins

**Input:** A binary tree and two nodes

**Cousin Nodes: **Cousin nodes are the nodes who are at the same level in the tree and whose parents are siblings.

**Example:**

**Approach:**

**Objective:** Given a binary tree, Print paths from root to all leaf nodes

**Input:** A binary tree

**Example**:

**Approach:**

Read morePrint Paths from root to all leaf nodes in a binary tree.