Objective: – Given Binary Tree, Print all the nodes which are X distance from the root Example : Appraoch:
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:
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...
Objective: 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 first node as root and...
Objective: Given a sorted doubly linked list, convert it into Balanced binary search tree Input: A Doubly Linked List Example: Approach:
Objective: Given a binary tree, Find the maximum path sum from one leaf node to another. Input: A binary tree. Example: Approach:
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:
Objective: Given a binary tree, Print paths from root to all leaf nodes Input: A binary tree Example: Approach: