Algorithms Zig Zag Traversal of Binary Tree In this article, we present 4 different approaches for Zig Zag Traversal of Binary Tree using stack, deque, recursion and an iterative approach.

Algorithms Check if 2 Binary Trees are isomorphic Two Binary Trees are known as isomorphic if one of them can be obtained from the other one by series of flipping of nodes, swapping the children both left and right of number of nodes.

Algorithms Convert Binary Tree to Circular Doubly Linked list To convert binary tree to circular doubly linked list, we will take left node as previous pointer and right node as next pointer. The order of nodes in Doubly Linked List must be same as in inorder of the given binary tree.

Algorithms Succinct (0-1) Encoding of Binary Tree Succinct (0-1) Encoding of Binary Tree is an approach to encode a Binary Tree to the lowest possible space and maintain the structural information.

Algorithms LCA in Binary Tree using Euler tour and Range Minimum Query In this problem, we will find the Lowest Common Ancestor of a Binary Tree using Euler tour and Range Minimum Query. We can solve the LCA problem by reducing it to a RMQ problem.

Algorithms Lowest Common Ancestor in a Binary Tree In binary trees, for given two nodes a and b, the lowest common ancestor is the node of which both a and b are descendants. We explored the algorithm to find Lowest Common Ancestor in a Binary Tree.

Problems on Binary Tree Operations in Threaded Binary Tree There are three main operations which can be done on a threaded binary tree Insert, Search and Delete operation which we have explained in depth.

Problems on Binary Tree Threaded Binary Tree Threaded binary tree is a simple binary tree but they have a speciality that null pointers of leaf node of the binary tree is set to inorder predecessor or inorder successor.

Problems on Binary Tree Checking if a Binary Tree is foldable A binary tree is foldable if the left subtree and right subtree are mirror images of each other. An empty tree is also foldable. We have presented two algorithms to check if Binary Tree is foldable.

Problems on Binary Tree Serialization and Deserialization of Binary Tree We have presented the process of Serialization and Deserialization of Binary Tree where we convert a Binary Tree into a compress form which can be saved in a file and retrieved back.

Problems on Binary Tree Convert a Binary Tree to a Skewed Binary Tree We have presented the algorithm to Change a Binary Tree to a Skewed Binary Tree (both Increasing Skewed Binary Tree and Decreasing Skewed Binary Tree).

Problems on Binary Tree Check if a Binary Tree is skewed or not We have presented the algorithm to check if a given Binary Tree is skewed or not (can be left or right skewed Binary Tree).

Problems on Binary Tree Introduction to Skewed Binary Tree A binary tree can be called a skewed binary tree if all nodes have one child or no child at all. There are two types: left and right skewed.

Problems on Binary Tree Find ancestors of a given node in a binary tree (Recursive + Iterative) Understand how to find ancestors of a given node in a binary tree recursively and iteratively in linear time O(N).

Problems on Binary Tree Find nodes which are at a distance k from root in a Binary Tree We are given the root of a tree, and an integer k. We need to print all the nodes which are a distance k from the root.

Problems on Binary Tree Find ancestors of a node in Binary tree (Recursive) In this problem, we are given a binary tree and a key k. We need to find out all the ancestors of node k. We have used a recursive approach.

Algorithms Finding nodes at distance K from a given node We have discussed the approach to find out the nodes at k distance from the given node. There are two approaches: one using Breadth First Traversal and other using Percolate Distance.

Problems on Binary Tree Check if a Binary Tree has duplicate values Given a Binary Tree, we will develop an algorithm to check if it has duplicate values. This can be done in linear time O(N) where there are N elements in the Binary Tree.

Problems on Binary Tree Find if a given Binary Tree is a Sub-Tree of another Binary Tree A sub-tree is a tree itself that is the subset of a bigger binary tree. A subtree of a node means that it is the child of that node. In this article, we will find out different ways to find out if a given binary tree is a sub-tree of another binary tree.

Problems on Binary Tree Convert Binary Tree to Threaded Binary Tree We will focus on different approaches on how to convert a normal binary tree into a threaded binary tree. We will convert our binary tree to single threaded binary tree with right pointers pointing to inorder successor (if it exists).

Problems on Binary Tree Check if a Binary Tree is Balanced by Height In this article, we have explored the algorithm to check if a Binary Tree is balanced by height or not.

Problems on Binary Tree Designing a Binary Search Tree with no NULLs A Binary Search Tree (BST) is usually implemented using NULLs in C or C++. This article explores an alternative approach of using placeholder nodes. Here the Binary Search Tree will be implemented in C++.

Problems on Binary Tree Finding Diameter of a Tree using DFS In this article, we will be discussing how to find the diameter of a tree or graph using Depth First Search (DFS).

Problems on Binary Tree Diameter of a Binary Tree In this problem, we are given input as the reference to the root of a binary tree. We need to find the diameter of the tree. We find the diameter using recursion and Depth First Search (DFS).

Problems on Binary Tree Algorithm to find Level of each node from root node In this article we will be discussing on how to find the level of each node in a graph, the algorithm that we will be using to find the level of each node is breadth first search.