This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/********** | |
【题目】试利用栈及其基本操作写出二叉树T的非递归 | |
的后序遍历算法(提示:为分辨后序遍历时两次进栈的 | |
不同返回点,需在指针进栈时同时将一个标志进栈)。 | |
二叉链表类型定义: | |
typedef struct BiTNode { | |
TElemType data; | |
struct BiTNode *lchild,*rchild; | |
} BiTNode, *BiTree; | |
可用栈类型Stack的相关定义: |