## Connect nodes at same level

Write a function to connect all the adjacent nodes at the same level in a binary tree. Structure of the given Binary Tree node is… Read More »

- 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
- Zig Zag Level order traversal of a tree using single queue
- DFS traversal of a tree using recursion
- Shannon-Fano Algorithm for Data Compression
- Find the node with maximum value in a Binary Search Tree
- Insert a node in Binary Search Tree Iteratively
- Print path between any two nodes in a Binary Tree
- Iterative Method To Print Left View of a Binary Tree
- 2-3 Trees | (Search and Insert)
- Print all even nodes of Binary Search Tree
- Search a node in Binary Tree
- Count the Number of Binary Search Trees present in a Binary Tree
- Shortest root to leaf path sum equal to a given number
- Flatten a binary tree into linked list | Set-3
- Level Ancestor Problem
- Print all nodes between two given levels in Binary Tree
- Zig-Zag traversal of a Binary Tree using Recursion
- Difference between graph and tree
- Sum of nodes at maximum depth of a Binary Tree | Set 2
- Check whether a given binary tree is skewed binary tree or not?
- Count all Grandparent-Parent-Child Triplets in a binary tree whose sum is greater than X
- Check if the given Binary Tree have a Subtree with equal no of 1's and 0's
- Sandvine Interview Experience for FTE 2018
- Counting inversions in an array using segment tree
- Number of subarrays have bitwise OR >= K
- Some Basic Theorems on Trees
- Clockwise Spiral Traversal of Binary Tree
- Reverse zigzag Traversal of a Binary Tree

Write a function to connect all the adjacent nodes at the same level in a binary tree. Structure of the given Binary Tree node is… Read More »

Given two binary trees, check if the first tree is subtree of the second one. A subtree of a tree T is a tree S… Read More »

Write a function that returns true if the given Binary Tree is SumTree else false. A SumTree is a Binary Tree where the value of… Read More »

Minimum Spanning Tree (MST) problem: Given connected graph G with positive edge weights, find a min weight set of edges that connects all of the… Read More »

Given two values k1 and k2 (where k1 < k2) and a root pointer to a Binary Search Tree. Print all the keys of tree… Read More »

Given a Binary Tree and a key, write a function that prints all the ancestors of the key in the given binary tree. For example,… Read More »

Given a Binary Tree and a key, write a function that returns level of the key. For example, consider the following tree. If the input… Read More »

Difficulty Level: Rookie Why Tree? Unlike Array and Linked List, which are linear data structures, tree is hierarchical (or non-linear) data structure. One reason to… Read More »

Given a root of a tree, and an integer k. Print all the nodes which are at k distance from root. For example, in the… Read More »

Question: Given a binary tree, find out if the tree can be folded or not. A tree can be folded if left and right subtrees… Read More »

Given a binary tree, write a function to get the maximum width of the given tree. Width of a tree is maximum of widths of… Read More »

Write a program that converts a given tree to its Double tree. To create Double tree of the given tree, create a new duplicate for… Read More »

For the below example tree, all root-to-leaf paths are: 10 –> 8 –> 3 10 –> 8 –> 5 10 –> 2 –> 2 Recommended:… Read More »

Let us consider the below traversals: Inorder sequence: D B E A F C Preorder sequence: A B D E C F Recommended: Please solve… Read More »

Given a binary tree and a number, return true if the tree has a root-to-leaf path such that adding up all the values along the… Read More »