## Tree with N nodes and K leaves such that distance between farthest leaves is minimized

Given N and K, print a tree such that the tree has no more than K leaf nodes and every other node has at least… 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
- Search a node in 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
- Check if the given Binary Tree have a Subtree with equal no of 1's and 0's
- Number of subarrays have bitwise OR >= K
- Iterative Boundary traversal of Complete Binary tree
- Count all Grandparent-Parent-Child Triplets in a binary tree whose sum is greater than X
- Find the number of distinct pairs of vertices which have a distance of exactly k in a tree
- Reverse Level Order traversal in spiral form
- 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
- 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
- Print all the levels with odd and even number of nodes in it | Set-2
- Sum of all the Boundary Nodes of a Binary Tree
- Distribute candies in a Binary Tree

Given N and K, print a tree such that the tree has no more than K leaf nodes and every other node has at least… Read More »

Given a Binary Search Tree, the task is to find the node with the maximum value in a BST. For the above tree, we start… Read More »

Given a Binary Search Tree. The task is to find the sum and product of maximum and minimum value of tree. For the above tree,… Read More »

Given a Binary Tree. The task is to find the sum and product of maximum and minimum element in it. For example, sum of the… Read More »

Top view of a binary tree is the set of nodes visible when the tree is viewed from the top. Given a binary tree, print… Read More »

Pre-Requisites: Depth First Search | Parent Array Representation Given a parent array representation of a binary tree, we need to find the number of Isosceles… Read More »

Given a Binary tree. The task is to find and print the product and sum of all internal nodes (non-leaf nodes) in the tree. In… Read More »

Given a Binary Tree. The task is to write a program to find the product of all of the nodes of the given binary tree.… Read More »

Given a binary search tree. The task is to print all even nodes of the binary search tree. Examples: Input : 5 / \ 3… Read More »

Given the root of a binary tree and a key x in it, find the distance of the given key from the root node. Distance… Read More »

Given a binary tree, find the product of all the leaf nodes. Examples: Input : 1 / \ 2 3 / \ / \ 4… Read More »

A recursive approach to insert a new node in a BST is already discussed in the post: Binary Search Tree | SET 1. In this… Read More »

2-3 tree is a tree data structure in which every internal node (non-leaf node) has either one data element and two children or two data… Read More »

Sandvine visited our campus for FTE. Total 3 round 1. Aptitude (20 MCQ) 20 min 2. Technical (30 MCQ) 40 min ( Computer Network, Operating… Read More »

Given a Binary Tree. The task is to print the number of set bits in each of the nodes in the Binary Tree. Recommended: Please… Read More »