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