void preorder(Node* root){ if(root != NULL){ cout<<root->data<<" "; preorder(root->left); preorder(root->right); } }