## Find the number of distinct pairs of vertices which have a distance of exactly k in a tree

Given an integer k and a tree with n nodes. The task is to count the number of distinct pairs of vertices which have a… Read More »

- Print nodes in top view of Binary Tree | Set 2
- MakeMyTrip Interview Experience 2019
- Print nodes in the Top View of Binary Tree | Set 3
- Print the nodes of binary tree as they become the leaf node
- Shannon-Fano Algorithm for Data Compression
- HashSet vs TreeSet in Java
- Zig Zag Level order traversal of a tree using single queue
- DFS traversal of a tree using recursion
- Preorder from Inorder and Postorder traversals
- Flatten a binary tree into linked list | Set-2
- Find the node with maximum value in a Binary Search Tree
- Print path between any two nodes in a Binary Tree
- Shortest root to leaf path sum equal to a given number
- Insert a node in Binary Search Tree Iteratively
- Print all even nodes of Binary Search Tree
- Level Ancestor Problem
- Print all nodes between two given levels in Binary Tree
- Flatten a binary tree into linked list | Set-3
- 2-3 Trees | (Search and Insert)
- Sandvine Interview Experience for FTE 2018
- Amadeus Labs R & D | On Campus (freshers) | Full time+Internship
- Search a node in Binary Tree
- Count pairs in a binary tree whose sum is equal to a given value x
- Difference between graph and tree
- Find the maximum node at a given level in a binary tree
- Check whether a given binary tree is skewed binary tree or not?
- Iterative Preorder Traversal of an N-ary Tree
- Sum of nodes at maximum depth of a Binary Tree | Set 2
- Counting inversions in an array using segment tree
- Preorder Traversal of N-ary Tree Without Recursion

Given an integer k and a tree with n nodes. The task is to count the number of distinct pairs of vertices which have a… Read More »

Given a Binary Tree, the task is to print the leaf nodes from left to right.The nodes must be printed in the order they appear… Read More »

Given three integers N, D and K. The task is to check whether it is possible to make a tree with exactly N vertices, D… Read More »

Given a Binary Tree, the task is to print the zigzag order of the tree. Examples: Input : 7 / \ 6 5 / /… Read More »

Given a binary tree and an integer K, the task is to remove all the nodes which are multiples of K from the given binary… Read More »

Given a Binary Tree with distinct values, the task is to print the first smallest root to leaf path. We basically need to print the… Read More »

Given an N-ary tree T of N nodes, the task is to calculate the longest path between any two nodes(also known as the diameter of… Read More »

Given a Binary tree, the task is to print all the internal nodes in a tree. An internal node is a node which carries at… Read More »

Given a Binary Tree, the task is to print the Reverse zigzag Order of the tree. Examples: Input: 1 / \ 2 3 / \… Read More »

Given the value of ‘N’ and ‘I’. Here, represents the number of internal nodes present in an N-ary tree and every node of the N-ary… Read More »

Given a Binary tree, print all the leaf nodes of a Binary tree at a given level L. Examples: Input: 1 / \ 2 3… Read More »

Given an integer N, the task is to construct a tree such that sum of for all ordered pairs (u, v) is maximum where u… Read More »

Given a binary tree with N nodes, in which each node value represents number of candies present at that node, and there are N candies… Read More »

Given a Binary Tree, print it’s left view. Left view of a Binary Tree is a set of nodes visible when tree is seen from… Read More »

Given a binary tree, the task is to print the sum of all the boundary nodes of the tree. Examples: Input: 1 / \ 2… Read More »