## Print a Binary Tree in Vertical Order | Set 2 (Hashmap based Method)

Leave a comment | Filed under TreesGiven a binary tree, print it vertically. The following example illustrates vertical order traversal.

Read More »Given a Binary Tree, print Right view of it. Right view of a Binary Tree is set of nodes visible when tree is visited from Right side.

Read More »We have discussed following topics on Red-Black tree in previous posts. We strongly recommend to refer following post as prerequisite of this post.

Read More »Given inorder and level-order traversals of a Binary Tree, construct the Binary Tree. Following is an example to illustrate the problem.

Read More »Given a binary tree, a target node in the binary tree, and an integer value k, print all the nodes that are at distance k from the given target node. No parent pointers are available.

Read More »Given a binary tree, print it vertically. The following example illustrates vertical order traversal.

Read More »Consider a situation where we have a set of intervals and we need following operations to be implemented efficiently.

Read More »## Check if a given Binary Tree is height balanced like a Red-Black Tree

6 Comments | Filed under TreesIn a Red-Black Tree, the maximum height of a node is at most twice the minimum height

Read More »Given a Binary Tree and a positive integer k, print all nodes that are distance k from a leaf node.

Read More »Find the distance between two keys in a binary tree, no parent pointers are given.

Read More »Given a binary tree (not a binary search tree) and two values say n1 and n2, write a program to find the least common ancestor.

Read More »Given a Binary Tree, print all nodes that don’t have a sibling (a sibling is a node that has same parent. In a Binary Tree, there can be at most one sibling).

Read More »Given a Binary Tree (BT), convert it to a Doubly Linked List(DLL) In-Place. The left and right pointers in nodes are to be used as previous and next pointers respectively in converted DLL.

Read More »In the previous post, we discussed introduction to Red-Black Trees. In this post, insertion is discussed.

Read More »