Wednesday, August 15, 2007

Write C code to determine if two trees are identical .

Here is a C program using recursion


int identical(struct node* a, struct node* b)
{
if (a==NULL && b==NULL){return(true);}
else if (a!=NULL && b!=NULL)
{
return(a->data == b->data &&
identical(a->left, b->left) &&
identical(a->right, b->right));
}
else return(false);
}

5 comments:

sandeep kumar said...

Thanks for the info.
Regards
Educational site

Anonymous said...

I feel that is among the most significant info for me.
And i'm happy studying your article. However wanna observation on some general issues, The website style is perfect, the articles is in point of fact great : D. Good job, cheers

Stop by my page - Bmi Calculator Women

Starcelebrity Noisse said...

"Great post! |3uy ch34p v14gr4 w1th fr33 5h199ing." Amc Square Reviews, Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews

Starcelebrity Noisse said...

"Great post! |3uy ch34p v14gr4 w1th fr33 5h199ing." Amc Square Reviews, Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews

Starcelebrity Noisse said...

"Great post! |3uy ch34p v14gr4 w1th fr33 5h199ing." Amc Square Reviews, Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews,Amc Square Reviews