按递增次序输出排序二叉树中所有大于x的结点数据,分递归版本和非递归版本
#include <stdio.h>
#include <stdlib.h>
#define TRUE 1
#define FALSE 0
typedef int Status;
typedef struct Node
{
int data;
int count;
struct Node *llink,*rlink;
}Node,*Tree;
Status SearchBST(Tree T,int key,Tree *p);
Status InsertBST(Tree *T,int e);
void Back_reverse_print1(Tree T,int x);
void Back_reverse_print1(Tree T,int x);
int main()
{
Tree T;
T=(Tree)malloc(sizeof(Node));
T=NULL;
int e;
printf("What number you want to search--0 to quit:");
scanf("%d",&e);
while(e)
{
if(!InsertBST(&T,e))
printf("Done!");
else
printf("It`s been inserted for the first time.");
printf("\nWhat number you want to search--0 to quit:");
scanf("%d",&e);
}
int x;
printf("打印大于x的数:");
scanf("%d",&x);
while(x)
{
Ba