void PostOrderTraversal(treeNode root)
{
treeNode tn = root;
if(tn)
{
PostOrderTraversal(tn->left);
PostOrderTraversal(tn->right);
values[num++] = tn->data; //将后序遍历出的节点值存入数组便于格式化打印
}
}
void Push(treeNode tn)
{
Stack[++top] = tn;
}
treeNode Pop()
{
return Stack[top--];
}
bool isEmpty()
{
return top == -1;
}
treeNode Top()
{
return Stack[top];
}