请各位帮我分析下二叉树中的栈
小弟初接触数据结构,请各位帮我分析下二叉树中数据出栈入栈的的过程,
以下面的中序遍历为例:
void Inorder(BinTree T)
{
if (T)
{ Inorder(T->lchild); // the left sub_tree
printf("%c", T->data); //access the Node
Inorder(T->rchild); // the right sub_tree
}
}
其中各结点的数据(T->data)从上到下从左到右为ABCDEF,
希望能详细地说明下数据在栈中进栈出栈的过程,谢谢!!