Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void noleaf(struct node *here)
- {
- if((temp -> left != NULL) || (temp -> right != NULL))
- {
- printf("%d" , temp -> data) ;
- if(temp -> left != NULL)
- {
- noleaf(temp -> left) ;
- }
- }
- noleaf(temp -> right) ;
- return 0 ;
- }
- struct node *Mirror(struct node *t)
- {
- if(t == NULL)
- {
- return 0 ;
- }
- else
- {
- nn = (struct node *)malloc(sizeof(struct node)) ;
- nn -> data = t -> data ;
- nn -> left = Mirror(t -> right);
- nn -> right = Mirror(t -> left) ;
- return nn ;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement