##
Largest BST in a Binary Tree | Set 2
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 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 »

Given root of a binary tree and a key x in it, find distance of the given key from root. Distance means number of edges… Read More »

May 13, 2017

We have already discuss the Binary Threaded Binary Tree. Insertion in Binary threaded tree is similar to insertion in binary tree but we will have… Read More »

May 9, 2017

Find the level in a binary tree which has maximum number of nodes. The root is at level 0. Examples: Input : 2 / \… Read More »

May 8, 2017

Given the level order traversal of a Complete Binary Tree, determine whether the Binary Tree is a valid Min-Heap Examples: Input : level = [10,… Read More »

May 7, 2017

Given a binary tree, find the number of subtrees having odd count of even numbers. Examples: Input : 2 / \ 1 3 / \… Read More »

May 5, 2017

Given an integer ‘K’ and a binary tree in string format. Every node of a tree has value in range from 0 to 9. We… Read More »

April 26, 2017

Given two binary trees, find first leaves of two trees that do not match. If there are no non-matching leaves, print nothing. Examples: Input :… Read More »

April 16, 2017

What is Prufer Code? Given a tree (represented as graph, not as a rooted tree) with n labeled nodes with labels from 1 to n,… Read More »

April 13, 2017

Given A binary Tree, how do you count all the half nodes (which has only one child) without using recursion? Note leaves should not be… Read More »

April 11, 2017

Given a binary tree, count leaves in the tree without using recursion. A node is a leaf node if both left and right children of… Read More »

April 2, 2017

Given a binary tree, print all nodes will are full nodes. Full Nodes are nodes which has both left and right children as non-empty. Examples:… Read More »

March 27, 2017

BK Tree or Burkhard Keller Tree is a data structure that is used to perform spell check based on Edit Distance (Levenshtein distance) concept. BK… Read More »

March 26, 2017

We encounter various problems like Maximum length palindrome in a string, number of palindromic substrings and many more interesting problems on palindromic substrings . Mostly… Read More »