##
Print path from root to a given node in a binary tree
June 18, 2017

Given a binary tree with distinct nodes(no two nodes have the same have data values). The problem is to print the path from root to… Read More »

June 18, 2017

Given a binary tree with distinct nodes(no two nodes have the same have data values). The problem is to print the path from root to… Read More »

June 17, 2017

Given a height h, count and return the maximum number of balanced binary trees possible with height h. A balanced binary tree is one in… Read More »

June 13, 2017

It is recommended to refer following post as prerequisite of this post. Splay Tree | Set 1 (Search) Following are the different cases to delete… Read More »

June 12, 2017

Given two binary tress. The problem is to check whether the two binary tress are mirrors of each other or not. Mirror of a Binary… Read More »

Quadtrees are trees used to efficiently store data of points on a two-dimensional space. In this tree, each node has at most four children. We… Read More »

June 11, 2017

Left-Child Right-Sibling Representation is a different representation of an n-ary tree where instead of holding a reference to each and every child node, a node… Read More »

June 9, 2017

Given a Binary Tree, write a function to check whether the given Binary Tree is a prefect Binary Tree or not. A Binary tree is… Read More »

June 8, 2017

Given a Binary Tree, print the nodes level wise, each level on a new line. Output: 1 2 3 4 5 Recommended: Please solve it… Read More »

June 7, 2017

Given a binary tree, check whether it is a mirror of itself without recursion. Examples: Input : 1 / \ 2 2 / \ /… Read More »

June 6, 2017

Given a Binary Tree (Every node has at most 2 children) where each node has value either 0 or 1. Convert a given Binary tree… Read More »

June 2, 2017

Given a string that contains ternary expressions. The expressions may be nested, task is convert the given ternary expression to a binary Tree. Examples: Input… Read More »

May 31, 2017

Given a binary tree with the node structure containing a data part, left and right pointers and an arbitrary pointer(abtr). The node’s value can be… Read More »

May 23, 2017

An n-ary tree in computer science is a collection of nodes normally represented hierarchically in the following fashion. The tree starts at the root node.… Read More »

May 16, 2017

Given a Binary Tree, write a function that returns the size of the largest subtree which is also a Binary Search Tree (BST). If the… Read More »

May 14, 2017

Given A binary Tree, how do you count all the full nodes (Nodes which have both children as not NULL) without using recursion and with… Read More »