private TreeNode build_sub2 (int[] inorder, int i_start, int i_end, int[] postorder, int p_start, int p_end)
    {
    	if (i_start > i_end || p_start > p_end)
    		return null;
    	
    	TreeNode root = new TreeNode(postorder[p_end]);
    	
    	int index = 0;
    	for (int i = i_start; i <= i_end; ++i)
    	{
    		if (inorder[i] == postorder[p_end])
    		{
    			index = i;
    			break;
    		}
    	}
    	
    	// now we have the index of root node in the inorder traversal
    	int len = index - i_start;
    	root.left = build_sub2(inorder, i_start, index-1, postorder, p_start, p_start+len-1);
    	root.right = build_sub2(inorder, index+1, i_end, postorder, p_start+len, p_end-1);
    	return root;
    }