| 15 | return temp; |
| 16 | } |
| 17 | void inorder(struct node *root) { |
| 18 | if (root != NULL) { |
| 19 | inorder(root->left); |
| 20 | cout << root->data << " "; |
| 21 | inorder(root->right); |
| 22 | } |
| 23 | } |
| 24 | int search(struct node *root, int key){ |
| 25 | struct node *prev = NULL; |
| 26 | while(root!=NULL){ |