## Maximum length cycle that can be formed by joining two nodes of a binary tree

Given a binary tree, the task is to find the maximum length of the cycle that can be formed by joining any two nodes of… 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
- 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
- Check if given Preorder, Inorder and Postorder traversals are of same tree | Set 2
- Check if the given binary tree has a sub-tree with equal no of 1's and 0's | Set 2
- Print all the levels with odd and even number of nodes in it | Set-2
- Range Sum Queries and Update with Square Root
- Sum of all the Boundary Nodes of a Binary Tree
- Determine the count of Leaf nodes in an N-ary tree
- Distribute candies in a Binary Tree

Given a binary tree, the task is to find the maximum length of the cycle that can be formed by joining any two nodes of… Read More »

Given a binary tree and an integer k, the task is to print the kth node in the vertical order traversal of binary tree.If no… Read More »

Given a Tree with N nodes, the task is to find a triplet of nodes (a, b, c) such that the number of nodes covered… Read More »

Given an array arr[] of size N. There are two types of operations: Update(l, r, x) : Increment the a[i] (l <= i <= r)… Read More »

Given a number N which is the total number of nodes in a complete binary tree where nodes are number from 1 to N sequentially… Read More »

Given a tree with N nodes, and two integers K and V. The task is to find the Kth node in the DFS traversal of… Read More »

Given a tree with n nodes and a number associated with every node. We can break any edge of the tree which will result in… Read More »

Given a N-ary tree with a value associated with each node, the task is to choose a subset of these nodes such that sum of… Read More »

Given a binary tree, the task is to find the Lowest Common Ancestor of the given two nodes in the tree. Let G be a… Read More »

Given a Binary Tree, the task is to check whether the given Binary Tree is a perfect Binary Tree or not. A Binary tree is… Read More »

Given a binary tree and a value K. The task is to print the k-th node in the diagonal traversal of the binary tree. If… Read More »

Given a binary tree, the task is to print all the leaf nodes of the binary tree from right to left. Examples: Input : 1… Read More »

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

Given a binary tree, the task is to print nodes of extreme corners of each level but in alternate order. Examples: Input : 1 /… Read More »

Given a binary tree, write a function that returns true if the tree satisfies below property: For every node, data value must be equal to… Read More »