Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*void passRoot(){
- cout << "INORDER: " << endl;
- inorder(root);
- cout << "POSTORDER" << endl;
- postorder(root);
- }
- void inorder(BSTNode<Data> * node) const{
- if(node->left != NULL)
- inorder(node->left);
- cout << node->data << endl;
- if(node->right != NULL)
- inorder(node->right);
- }
- void postorder(BSTNode<Data> *node) const{
- if(node->left != NULL)
- inorder(node->left);
- if(node->right != NULL)
- inorder(node->right);
- cout << node->data << endl;
Add Comment
Please, Sign In to add comment