목차
2.70KB
본문내용
#include
#include
#include
#define TRUE 1
#define FALSE 0
typedef struct BST {
int data;
struct BST *left;
struct BST *right;
} BST;
BST *make_node();
BST *init_BST(int);
int insert_BST(BST *, int);
int search_BST(BST *, int);
void pre_BST(BST *);
void in_BST(BST *);
void post_BST(BST *);
BST *make_node() {
BST *temp;
temp = (BST *)malloc(sizeof(BST));
return temp;
}
BST *init_BST(int num) {
BST *root;
root = make_node();
root->data = num;
root->left = NULL;
root->right = NULL;
return root;
}
#include
#include
#define TRUE 1
#define FALSE 0
typedef struct BST {
int data;
struct BST *left;
struct BST *right;
} BST;
BST *make_node();
BST *init_BST(int);
int insert_BST(BST *, int);
int search_BST(BST *, int);
void pre_BST(BST *);
void in_BST(BST *);
void post_BST(BST *);
BST *make_node() {
BST *temp;
temp = (BST *)malloc(sizeof(BST));
return temp;
}
BST *init_BST(int num) {
BST *root;
root = make_node();
root->data = num;
root->left = NULL;
root->right = NULL;
return root;
}
소개글