# Tag Archives: Inorder Traversal

## Count nodes having highest value in the path from root to itself in a Binary Tree

Given a Binary Tree, the task is to count the number of nodes in the Binary Tree, which are the highest valued node in the… Read More »

## Print the nodes corresponding to the level value for each level of a Binary Tree

Given a Binary Tree, the task for each level L is to print the Lth node of the tree. If the Lth node is not… Read More »

## Print the Forests of a Binary Tree after removal of given Nodes

Given a Binary Tree and an array arr[] consisting of values of nodes to be deleted, the task is to print Inorder Traversal of the… Read More »

## Mix Order Traversal of a Binary Tree

Given a Binary Tree consisting of N nodes, the task is to print its Mix Order Traversal.   Mix Order Traversal is a tree traversal technique,… Read More »

## Double Order Traversal of a Binary Tree

Given a Binary Tree consisting of N nodes, the task is to print its Double Order Traversal. Double Order Traversal is a tree traversal technique… Read More »

## Post Order Traversal of Binary Tree in O(N) using O(1) space

Prerequisites:- Morris Inorder Traversal, Tree Traversals (Inorder, Preorder and Postorder)Given a Binary Tree, the task is to print the elements in post order using O(N)… Read More »

## Print the nodes that are just above the leaf node

Given a binary tree consisting of N nodes, the task is to print the nodes that are just above the leaf node.Examples: Input: N =… Read More »

## Print K inorder successors of a Binary Tree in O(1) space

Given a Binary Tree and two numbers P and K, the task is to print the K Inorder Successor of the given number P from… Read More »

## Check if Inorder traversal of a Binary Tree is palindrome or not

Given a binary tree and the task if to check if its Inorder Sequence is a palindrome or not. Examples: Input: Output: True Explanation: The… Read More »

## Common nodes in the inorder sequence of a tree between given two nodes in O(1) space

Given a binary tree consisting of distinct values and two numbers K1 and K2, the task is to find all nodes that lie between them… Read More »

## Print all pairs from two BSTs whose sum is greater than the given value

Given two Binary Search Tree (BSTs) and a value X, the problem is to print all pairs from both the BSTs whose sum is greater… Read More »

## Split a BST into two balanced BSTs based on a value K

Given a Binary Search tree and an integer K, we have to split the tree into two Balanced Binary Search Tree, where BST-1 consists of… Read More »

## Inorder traversal of an N-ary Tree

Given an N-ary tree containing, the task is to print the inorder traversal of the tree. Examples:  Input: N = 3   Output: 5 6 2… Read More »

## Check if a Binary Tree is BST : Simple and Efficient Approach

Given a Binary Tree, the task is to check whether the given binary tree is Binary Search Tree or not.A binary search tree (BST) is… Read More »

## Calculate height of Binary Tree using Inorder and Level Order Traversal

Given Inorder traversal and Level Order traversal of a Binary Tree. The task is to calculate the height of the tree without constructing it. Example:… Read More »