## Search a node in Binary Tree

Given a Binary Node and a node. The task is to search and check if the given node exits in the binary tree or not.… Read More »

## DFS traversal of a tree using recursion

Given a Binary tree, Traverse it using DFS using recursion. Unlike linear data structures (Array, Linked List, Queues, Stacks, etc) which have only one logical… Read More »

## Preorder Traversal of N-ary Tree Without Recursion

Given an n-ary tree, print preorder traversal of it. Example : Preorder traversal of below tree is A B K N M J F D… Read More »

## Root to leaf path sum equal to a given number in BST

Given a BST and a number. The task is to check whether the given number is equal to the sum of all the node from… Read More »

## Iterative Preorder Traversal of an N-ary Tree

Given a K-ary Tree. The task is to write an iterative program to perform the preorder traversal of the given n-ary tree. Examples: Input: 3-Array… Read More »

## 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 »

## Number of elements smaller than root using preorder traversal of a BST

Given a preorder traversal of a BST. The task is to find the number of elements less than root. Examples: Input: preorder[] = {3, 2,… Read More »

## Arithmetic Expression Evalution

The stack organization is very effective in evaluating arithmetic expressions. Expressions are usually represented in what is known as Infix notation, in which each operator… Read More »

## Sudo Placement[1.4] | Jumping the Subtree

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 »

## Find postorder traversal of BST from preorder traversal

Given an array representing preorder traversal of BST, print its postorder traversal. Examples: Input : 40 30 35 80 100 Output : 35 30 100… Read More »

## 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 »

## Preorder predecessor of a Node in Binary Tree

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 »

## Preorder Successor of a Node in Binary Tree

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

## Find next right node of a given key | Set 2

Given a Binary tree and a key in the binary tree, find the node right to the given key. If there is no node on… Read More »

## Construct Tree from given Inorder and Preorder traversals

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 »