## Efficiently print all nodes between two given levels in a binary tree

Given a binary tree, efficiently print all nodes between two given levels in a binary tree. The nodes for any level should be printed from left to right.

## Find the difference between sum of all nodes present at odd and even levels in a binary tree

Given a binary tree, calculate the difference between sum of all nodes present at odd levels and sum of all nodes present at even level.

## Print nodes of a given binary tree in vertical order

Given a binary tree, print its nodes in vertical order. Assume that the left and right child of a node makes 45 degree angle with the parent.

## Link nodes present in each level of a binary tree in the form of a linked list

Given a binary tree, write an efficient algorithm to link nodes at the same level in the form of a linked list like structure.

## Implementation of Treap Data Structure (Insert, Search and Delete)

In this post, we will implement Treap Data Structure and perform basic operations like insert, search and delete on it.

## Find preorder traversal of a binary tree from its inorder and postorder sequence

Write an efficient algorithm to find preorder traversal of a binary tree from its inorder and postorder sequence without constructing the tree.

## Update every key in BST to contain sum of all greater keys

Given a binary search tree, modify it such that every key is updated to contain sum of all greater keys present in BST.

## Fix a binary tree that is only one swap away from becoming a BST

Given a binary tree that is only one swap away from becoming a BST, convert the binary tree into BST in single traversal of it.

## Find maximum sum path between two leaves in a binary tree

Given a binary tree, write an efficient algorithm to find maximum sum path between any two leaves in it.

## Find all nodes at given distance from leaf nodes in a binary tree

Given a binary tree, write an efficient algorithm to find all nodes present at given distance from any leaf node. We need to find only those nodes that are present in root-to-leaf path for that leaf.

## Count all subtrees having same value of nodes in a binary tree

Given a binary tree, count all subtrees in it such that every node in the subtree have same value.

## Find Inorder Successor for given key in a BST

Given a BST, find inorder successor of a given key in it. If the given key do not lie in the BST, then return the next greater key (if any) present in the BST.