## Total sum except adjacent of a given node in a Binary Tree

Given a BT and a key Node, find the total sum in BT, except those Node which are adjacent to key Node. Examples: Recommended: Please… 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
- Shannon-Fano Algorithm for Data Compression
- Insert a node in Binary Search Tree Iteratively
- Find the node with maximum value in a Binary Search Tree
- Iterative Method To Print Left View of a Binary Tree
- Print path between any two nodes in a Binary Tree
- Count the Number of Binary Search Trees present in a Binary Tree
- Search a node in Binary Tree
- Print all even nodes of Binary Search Tree
- Flatten a binary tree into linked list | Set-3
- Zig-Zag traversal of a Binary Tree using Recursion
- Shortest root to leaf path sum equal to a given number
- Difference between graph and tree
- Print all nodes between two given levels in Binary Tree
- Sum of nodes at maximum depth of a Binary Tree | Set 2
- Some Basic Theorems on Trees
- Clockwise Spiral Traversal of Binary Tree
- Check whether a given binary tree is skewed binary tree or not?
- Remove minimum elements from either side such that 2*min becomes more than max | Set 2
- Reverse zigzag Traversal of a Binary Tree
- Number of subarrays have bitwise OR >= K
- Counting inversions in an array using segment tree
- 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
- Find the number of distinct pairs of vertices which have a distance of exactly k in a tree
- Iterative Boundary traversal of Complete Binary tree
- Sum of all odd nodes in the path connecting two given nodes
- Sum and Product of minimum and maximum element of Binary Search Tree

Given a BT and a key Node, find the total sum in BT, except those Node which are adjacent to key Node. Examples: Recommended: Please… Read More »

Given a binary tree, flatten it into a linked list. After flattening, the left of each node should point to NULL and right should contain… Read More »

Consider you have an infinitely long binary tree having a pattern as below: 1 / \ 2 3 / \ / \ 4 5 6… Read More »

Given an array arr[0 . . . n-1]. The task is to perform the following operation: Find the maximum of elements from index l to… Read More »

Given a binary tree, find the maximum vertical level sum in binary tree. Examples: Input : 3 / \ 4 6 / \ / \… Read More »

We have discussed recursive segment tree implementation. In this post, iterative implementation is discussed. Let us consider the following problem understand Segment Trees. We have… Read More »

Round 1: Round 1 was for 200 marks. 25 MCQs and 2 coding questions .The MCQs were mostly on aptitude and some were Technical (C++… Read More »

Given a binary search tree of n nodes with distinct values. Also given are Q queries. Each query consists of a node value that has… Read More »

Given N elements to be inserted into Binary Search Tree. The task is to construct a binary search tree with only insert operation and finally… Read More »

A recursive and a non-recursive program to delete an entire binary tree has already been discussed in the previous posts. In this post, deleting the… Read More »

Given n nodes of a tree and their connections, print Subtree nodes of every node. Subtree of a node is defined as a tree which… Read More »

Given a Binary Search Tree and a number N, the task is to find the smallest number in the binary search tree that is greater… Read More »

Write a function to print spiral order traversal of a tree. For below tree, function should print 1, 2, 3, 4, 5, 6, 7. You… Read More »

Given a binary tree and a node, print all cousins of given node. Note that siblings should not be printed. Examples: Input : root of… Read More »

What is Calkin Wilf Sequence? A Calkin-Wilf tree (or sequence) is a special binary tree which is obtained by starting with the fraction 1/1 and… Read More »