## Find n-th node in Preorder traversal of a Binary Tree

Given a Binary tree and a number N, write a program to find the N-th node in the Preorder traversal of the given Binary tree.… Read More »

- Iterative Method To Print Left View of a Binary Tree
- Count the Number of Binary Search Trees present in a Binary Tree
- Zig-Zag traversal of a Binary Tree using Recursion
- Check if given Preorder, Inorder and Postorder traversals are of same tree | Set 2
- Reverse zigzag Traversal of a Binary Tree
- Reverse Level Order traversal in spiral form
- Sum of nodes at maximum depth of a Binary Tree | Set 2
- Iterative Postorder traversal | Set 3
- Check if the given Binary Tree have a Subtree with equal no of 1's and 0's
- Print All Leaf Nodes of a Binary Tree from left to right | Set-2 ( Iterative Approach )
- LCA in a tree using Binary Lifting Technique
- Convert a given Binary Tree to Circular Doubly Linked List | Set 2
- Sum of all the Boundary Nodes of a Binary Tree
- Print all leaf nodes of a binary tree from right to left
- Sum of nodes in bottom view of Binary Tree
- Check if two nodes in a Binary Tree are siblings
- Print Binary Tree levels in sorted order | Set 3 (Tree given as array)
- Distribute candies in a Binary Tree
- Create a mirror tree from the given binary tree
- Check if the given binary tree has a sub-tree with equal no of 1's and 0's | Set 2
- Maximum sub-tree sum in a Binary Tree such that the sub-tree is also a BST
- K-th ancestor of a node in Binary Tree | Set 3
- Clockwise Spiral Traversal of Binary Tree | Set - 2
- Minimum sum path between two leaves of a binary tree
- Construct Binary Tree from given Parent Array representation | Iterative Approach
- Print leaf nodes in binary tree from left to right using one stack
- Print the first shortest root to leaf path in a Binary Tree
- Iterative approach to check for children sum property in a Binary Tree
- Minimum and maximum node that lies in the path connecting two nodes in a Binary Tree
- Find the kth node in vertical order traversal of a Binary Tree

Given a Binary tree and a number N, write a program to find the N-th node in the Preorder traversal of the given Binary tree.… Read More »

Given a binary tree, the task is to find the distance between two keys in a binary tree, no parent pointers are given. Distance between… Read More »

Given a binary tree and a node in the binary tree, find Preorder predecessor of the given node. Examples: Consider the following binary tree 20… Read More »

Given a binary tree and a node in the binary tree, find preorder successor of the given node. It may be assumed that every node… Read More »

Given a binary tree, the task is to find the distance between two keys in a binary tree, no parent pointers are given. The distance… Read More »

Given a binary tree where each node can have at most two child nodes, the task is to find the Euler tour of the binary… Read More »

The diameter of a tree (sometimes called the width) is the number of nodes on the longest path between two end nodes. In this post,… Read More »

Given a binary tree. Find if a given vertical level of the binary tree is sorted or not. (For the case when two nodes are… Read More »

Given a binary tree, find the vertical width of the binary tree. Width of a binary tree is the number of vertical paths. Examples: Input… Read More »

Given a binary tree, find the vertical width of the binary tree. The width of a binary tree is the number of vertical paths. In… Read More »

Talking about representation, trees can be represented in two way: 1) Dynamic Node Representation (Linked Representation). 2) Array Representation (Sequential Representation). We are going to… Read More »

Given a binary tree in which nodes are numbered from 1 to n. Given a node and a positive integer K. We have to print… Read More »

Given a binary tree and a node, we need to write a program to find inorder successor of this node. Inorder Successor of a node… Read More »

Given Preorder , Inorder and Postorder traversals of some tree. Write a program to check if they all are of the same tree. Examples: Input… Read More »

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