Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int h(node *root)
- { if(!root)
- return 0;
- return 1 + max(h(root->left),h(root->right));
- }
- void printdlin(const node * p)
- {
- if(p!=NULL)
- {
- if(h(p->left)>h(p->right))
- printdlin(p->left);
- else
- printdlin(p->right);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement