@don : i did not get it , what will be data in file?
On Mon, Nov 11, 2013 at 10:14 PM, Don wrote:
> Save in preorder, tagging each node with two bits indicating if that node
> has a left and right subtree.
>
> Then rebuild like this:
>
> Tree rebuild()
> {
>Tree result = readNode();
>Tr
Save in preorder, tagging each node with two bits indicating if that node
has a left and right subtree.
Then rebuild like this:
Tree rebuild()
{
Tree result = readNode();
Tree->left = hasLeftSubtree ? rebuild() : 0;
Tree->right = hasRightSubtree ? rebuild() : 0;
return result;
}
On