@ bittu and bharath

the tree is given in form of string




On Sun, Feb 6, 2011 at 6:55 PM, Bharath M R <[email protected]>wrote:

> bool visit(node temp1, node temp2)
> {
>     if(temp1.left==null && temp2.right==null)
>          return true;
>     else if((temp1.left==null && temp2.right!=null) || (temp1.left!=null &&
> temp2.right==null))
>          return false;
>     else
>          return visit(temp1.left,temp2.right);
>
>    -- do the same for temp1.right and temp2.left
> }
>
> Just check whether root. left and root.right are not null and pass it the
> visit function.
>
>
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
With Regards,
*Jalaj Jaiswal* (+919019947895)
Final Year Undergraduate,
IIIT ALLAHABAD

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to