## Find the maximum path sum between two leaves of a binary tree

Given a binary tree in which each node element contains a number. Find the maximum possible sum from one leaf node to another. The maximum… Read More »

- MakeMyTrip Interview Experience 2019
- Print the nodes of binary tree as they become the leaf node
- Iterative Method To Print Left View of a Binary Tree
- Shannon-Fano Algorithm for Data Compression
- Count the Number of Binary Search Trees present in a Binary Tree
- Print path between any two nodes in a Binary Tree
- Flatten a binary tree into linked list | Set-3
- Zig-Zag traversal of a Binary Tree using Recursion
- Difference between graph and tree
- Shortest root to leaf path sum equal to a given number
- Remove minimum elements from either side such that 2*min becomes more than max | Set 2
- Clockwise Spiral Traversal of Binary Tree
- Reverse zigzag Traversal of a Binary Tree
- Sum of nodes at maximum depth of a Binary Tree | Set 2
- Number of subarrays have bitwise OR >= K
- Check if the given Binary Tree have a Subtree with equal no of 1's and 0's
- Iterative Boundary traversal of Complete Binary tree
- Count all Grandparent-Parent-Child Triplets in a binary tree whose sum is greater than X
- Reverse Level Order traversal in spiral form
- Find the number of distinct pairs of vertices which have a distance of exactly k in a tree
- Building Expression tree from Prefix Expression
- Print All Leaf Nodes of a Binary Tree from left to right | Set-2 ( Iterative Approach )
- Spanning Tree With Maximum Degree (Using Kruskal's Algorithm)
- Sum of all odd nodes in the path connecting two given nodes
- Print all the levels with odd and even number of nodes in it | Set-2
- Range Sum Queries and Update with Square Root
- Check if the given binary tree has a sub-tree with equal no of 1's and 0's | Set 2
- Sum of all the Boundary Nodes of a Binary Tree
- Check if given Preorder, Inorder and Postorder traversals are of same tree | Set 2
- Distribute candies in a Binary Tree

Given a binary tree in which each node element contains a number. Find the maximum possible sum from one leaf node to another. The maximum… Read More »

Inorder traversal of a Binary tree can either be done using recursion or with the use of a auxiliary stack. The idea of threaded binary… Read More »

Given a Perfect Binary Tree, reverse the alternate level nodes of the binary tree. Given tree: a / \ b c / \ / \… Read More »

I recently cleared the Amazon SDE position. Through out my prepration GeeksforGeeks played great role, this is the only site which i referred/followed more than… Read More »

Given a binary tree, print it vertically. The following example illustrates vertical order traversal. 1 / \ 2 3 / \ / \ 4 5… Read More »

Given a Binary Tree, print Right view of it. Right view of a Binary Tree is set of nodes visible when tree is visited from… Read More »

Given inorder and level-order traversals of a Binary Tree, construct the Binary Tree. Following is an example to illustrate the problem. Input: Two arrays that… Read More »

Given a binary tree, a target node in the binary tree, and an integer value k, print all the nodes that are at distance k… Read More »

In a Red-Black Tree, the maximum height of a node is at most twice the minimum height (The four Red-Black tree properties make sure this… Read More »

Given a Binary Tree and a positive integer k, print all nodes that are distance k from a leaf node. Here the meaning of distance… Read More »

Find the distance between two keys in a binary tree, no parent pointers are given. Distance between two nodes is the minimum number of edges… Read More »

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.… Read More »

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 »