void BinaryTree<T>::_PrevOrder(Node *root){ if(root==NULL){ return ; } std::cout<<root->_value<<" "; _PrevOrder(root->_left); _PrevOrder(root->_right); }
void _PrevOrder(BSTNode<K,V>* root) { if (root) { _PrevOrder(root->_left); // cout<<"[key:"<<root->_key<<","<<root->_value<<"]"<<"->"; cout<<root->_key<<", "; _PrevOrder(root->_right); } }
void PrevOrder() { _PrevOrder(_root); cout<<endl; }
void BinaryTree<T>::PrevOrder(){ _PrevOrder(_root); std::cout<<std::endl; }