摘要: 关于二叉树节点的经典定义struct Node { int data; struct Node *left; struct Node *right;};后序非递归实现void PostTravelNoRecure(struct Node *root){ stack<struct Node*> st; struct Node * prev = NULL;//最近一次访问节点 struct Node * pNode = root;//最近一次访问节点 while(pNode||!st.empty()) { //找到最左节点... 阅读全文
posted @ 2011-09-27 10:32 westfly 阅读(256) 评论(0) 推荐(0) 编辑