## Convert normal binary tree to Left-child right-sibling binary tree

Given a normal binary tree, convert it to Left-child right-sibling (LC-RS) binary tree.

Read More Convert normal binary tree to Left-child right-sibling binary treeCoding made easy

Binary Trees

Given a normal binary tree, convert it to Left-child right-sibling (LC-RS) binary tree.

Read More Convert normal binary tree to Left-child right-sibling binary treeHuffman Coding is a algorithm for doing data compression and it forms the basic idea behind file compression. This post talks about fixed length and variable length encoding, uniquely decodable codes, prefix rules and construction of Huffman Tree.

Read More Huffman CodingGiven a binary tree, write an efficient algorithm to check if tree is height balanced or not. In a height balanced tree, the absolute difference between height of left subtree and right subtree for every node is 0 or 1.

Read More Check if given binary tree is height balanced or notGiven a Binary Tree, determine if it is a BST or not. This problem has a simple recursive solution. The BST property “every node on the right subtree has to be larger than the current node and every node on the left subtree has to be smaller than the current node” is the key …

Read More Determine if given Binary Tree is a BST or notGiven a binary tree, write an efficient algorithm to find maximum sum root to leaf path i.e. maximum sum path from root node to any leaf node in it.

Read More Find maximum sum root to leaf path in a binary treeGiven a binary tree, a complete path is defined as a path from root to a leaf. The sum of all nodes on that path is defined as the sum of that path. Given a number K, remove nodes from the tree which lie on a path having sum less than K.

Read More Truncate given binary tree to remove nodes which lie on a path having sum less than KGiven a binary tree, convert it to full tree by removing half nodes (remove nodes having one children).

Read More Convert given binary tree to full tree by removing half nodesGiven a binary tree containing many zero nodes, sink nodes having zero value to the bottom of the sub-tree rooted at that node. In other words, the output binary tree should not contain any node having zero value that is parent of node having non-zero value.

Read More Sink nodes containing zero to the bottom of the binary treeGiven a binary tree, in-place convert it to a Doubly Linked List.

Read More In-place convert convert given Binary Tree to Doubly Linked ListGiven a binary tree, print corner nodes of every level in it.

Read More Print corner nodes of every level in binary treeGiven a binary tree, print all nodes for each diagonal having negative slope (\). Assume that the left and right child of a node makes 45 degree angle with the parent.

Read More Print Diagonal Traversal of Binary TreeGiven a binary tree, calculate sum of all nodes for each diagonal having negative slope (\). Assume that the left and right child of a node makes 45 degree angle with the parent.

Read More Find the diagonal sum of given binary treeGiven a binary tree, perform vertical traversal of it. In vertical traversal, we print nodes of a binary tree in vertical order by assuming that the left and right child of a node makes 45 degree angle with the parent.

Read More Print nodes in vertical order of a given Binary Tree (Vertical Traversal)Given a binary tree, print vertical sum of it. Assume, the left and right child of a node makes 45 degree angle with the parent.

Read More Find Vertical Sum in a given Binary Tree