Skip to content

Instantly share code, notes, and snippets.

View Daniel612's full-sized avatar
😀
Working on it.

Guozheng Zhang Daniel612

😀
Working on it.
View GitHub Profile
@Daniel612
Daniel612 / gist:8dd5eb8f5aa39fa86db32efce5eb5877
Created November 26, 2016 08:50
利用栈的二叉树非递归后序遍历
/**********
【题目】试利用栈及其基本操作写出二叉树T的非递归
的后序遍历算法(提示:为分辨后序遍历时两次进栈的
不同返回点,需在指针进栈时同时将一个标志进栈)。
二叉链表类型定义:
typedef struct BiTNode {
TElemType data;
struct BiTNode *lchild,*rchild;
} BiTNode, *BiTree;
可用栈类型Stack的相关定义: