Its working I guess in both the cases...

On 7/14/11, Anika Jain <anika.jai...@gmail.com> wrote:
> can some body tell me that:
>
> void swap(node *p,node *q)
> {
>     node *t;
>     t=p;
>     p=q;
>     q=t;
> }
>
> void mirror(node *p)
> {
>     if (p==NULL)
>         return;
>
>     else
>     {    mirror(p->r);
>         mirror(p->l);
>         swap(p->r,p->l);
>     }
> }
>
> in this the swapping is occuring but if i do :
>
> void mirror(node *p)
> {
>     if (p==NULL)
>         return;
>
>     else
>     {    mirror(p->r);
>         mirror(p->l);
>          node *t;
>          t=p->r;
>         p->r=p->l;
>         p->l=t;
>     }
> }
>
>
> here it is not getting done .. why??
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>


-- 
*Piyush Sinha*
*IIIT, Allahabad*
*+91-7483122727*
* <https://www.facebook.com/profile.php?id=100000655377926> "NEVER SAY
NEVER"
*

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

Reply via email to