不用这个博客,去年建了个个人小站,服务器还未备案,所以地址暂缓放出
void PosOrder(BT *bt)
{
int i = 0, a[MaxSize];
BT *s[MaxSize], *p;
while (p != NULL || i != 0)
{
while (p != NULL)
{
s[++i] = p;
a[i] = 0;
p = p->Lchild;
}
if (i > 0)
{
if (a[i] == 0)
{
p = s[i];
if (i > 0)
{
p = p->Rchild;
a[...
#define MaxSize 100
typedef struct BTree
{
int data;
struct BTree *Lchild;
struct BTree *Rchild;
}BT;
void inorder(BT *bt)
{
int i = 0;
BT *s[MaxSize], *p;
p = bt;
do {
while (p != NULL)
{
s[i++] = p;
p = p->Lchild;
}
if (i>0)
{
p = s[i--];
pri...