标签:
void printTopDown(BinaryTree* root)
{
deque<BinaryTree> dequeB;
deque.push_back(root);
while(!deque.empty())
{
BinaryTree*p=deque.front();
cout<<p->value<<endl;
if(p->left)
dequeB.push_back(p->left);
if(p->right)
dequeB.push_back(p->right);
}
}
标签:
原文地址:http://www.cnblogs.com/mmziscoming/p/5771179.html