Construct Binary Tree From Inorder and Preorder/Postorder Traversal
April 20, 2011 in binary tree
Given preorder and inorder traversal of a tree, construct the binary tree.
April 20, 2011 in binary tree
Given preorder and inorder traversal of a tree, construct the binary tree.
April 6, 2011 in binary search
Note:
This is Part II of the article: The Painter’s Partition Problem. Please read Part I for more background information.
Read the rest of this entry →
April 5, 2011 in dynamic programming
You have to paint N boards of length {A0, A1, A2 … AN-1}. There are K painters available and you are also given how much time a painter takes to paint 1 unit of board. You have to get this job done as soon as possible under the constraints that any painter will only paint continuous sections of board, say board {2, 3, 4} or only board {1} or nothing but not board {2, 4, 5}.