BiTree * BuildByFirst(int A[], int cur, int n)
{
if (cur >= n)
return NULL;
BiTree *tmp = new BiTree()
tmp->data = A[cur];
tmp->left = BuildByFirst(A, 2 * cur + 1, n);
tmp->right = BuildByFirst(A, 2 * cur + 2, n);
return tmp;
}
void Conversion(int A[],int n, BiTree &T)
{
BiTree *tmp = BuildByFirst(A, 0, n);
T = *tmp;
delete tmp;
}