## Level order traversal in spiral form | Using Deque

Given a Binary Tree, the task is to print spiral order traversal of the given tree. For below tree, the function should print 1, 2,… Read More »

- Calculate height of Binary Tree using Inorder and Level Order Traversal
- Count all k-sum paths in a Binary Tree
- Find the Deepest Node in a Binary Tree Using Queue STL - SET 2
- Sum of nodes in the left view of the given binary tree
- Convert ternary expression to Binary Tree using Stack
- Duplicate subtree in Binary Tree | SET 2
- Find Maximum Level Sum in Binary Tree using Recursion
- Sum of nodes in the right view of the given binary tree
- Maximum XOR with given value in the path from root to given node in the tree
- Delete the last leaf node in a Binary Tree
- Convert a given Binary tree to a tree that holds Logical OR property
- Sink even nodes in Binary Tree
- Difference between General tree and Binary tree
- Skewed Binary Tree
- Extended Binary Tree

Given a Binary Tree, the task is to print spiral order traversal of the given tree. For below tree, the function should print 1, 2,… Read More »

Given a binary tree, the task is to find the sum of all the nodes whose parent is even. Examples: Input: 1 / \ 3… Read More »

Given the leaf nodes of a perfect binary tree, the task is to construct the XOR tree and print the root node of this tree.… Read More »

Given an ancestor matrix mat[n][n] where the ancestor matrix is defined as below. mat[i][j] = 1 if i is ancestor of j mat[i][j] = 0,… Read More »

Given a binary tree, the task is to print left and right leaf nodes separately. Examples: Input: 0 / \ 1 2 / \ 3… Read More »

Given a string str containing only lowercase characters. The problem is to print the characters along with their frequency in the order of their occurrence… Read More »

Given a number K, the task is to print the prime numbers present at that level given all the prime numbers are represented in the… Read More »

Given a binary tree of 0s and 1s, the task is to find the maximum number of 1s in any path in the tree. The… Read More »

Given a binary tree in such a way such that the level order traversal of a binary tree produces a string S. The task is… Read More »

Construct a Binary Tree from the given Binary Search Tree such that it’s level order traversal outputs sorted data. Examples: Input: Output: 1 2 3… Read More »

Given a Binary Tree of distinct nodes and a pair of nodes. The task is to find and print the path between the two given… Read More »

Given an integer N and an infinite number of Full Binary Trees of different depths, the task is to choose minimum number of trees such… Read More »

B-Tree : B-Tree is known as self-balancing tree as its nodes are sorted in inorder traversal. Unlike binary tree, in B-tree, a node can have… Read More »

Given three vertices U, V and R of a binary tree, the task is to check whether R lies in the path between U and… Read More »

Given a Binary Tree, the task is to print the elements in the Vertical Zig-Zag traversal order. Vertical Zig-Zag traversal of a tree is defined… Read More »