| 15 | node *left,*right; |
| 16 | }; |
| 17 | node* create() |
| 18 | { |
| 19 | int x; |
| 20 | cin>>x; |
| 21 | node *p; |
| 22 | p=new node; |
| 23 | p->data=x; |
| 24 | p->left=NULL; |
| 25 | // p->right=NULL; |
| 26 | if(x==-1) |
| 27 | { |
| 28 | return 0; |
| 29 | } |
| 30 | p->left=create(); |
| 31 | p->right=create(); |
| 32 | return p; |
| 33 | } |
| 34 | int height(node* head){ |
| 35 | if(head==NULL) |
| 36 | return 0; |