buffet
This commit is contained in:
parent
736cd37d5b
commit
9bc82f2b39
@ -42,12 +42,12 @@ void search(struct tree* this){
|
|||||||
int x = strlen(buffer);
|
int x = strlen(buffer);
|
||||||
buffer[x-1]='\0';
|
buffer[x-1]='\0';
|
||||||
|
|
||||||
/*if(this == NULL){
|
if(buffer[0] == '\n'){
|
||||||
return;
|
return;
|
||||||
} */
|
}
|
||||||
if(buffer[0] == 'a'){
|
if(buffer[0] == 'a'){
|
||||||
if(this->value[0] == '*'){
|
if(this->left->value[0] == '*'){
|
||||||
printf("%s\n", this->value);
|
printf("%s\n", this->left->value);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
printf("%s\n", this->left->value);
|
printf("%s\n", this->left->value);
|
||||||
@ -78,17 +78,6 @@ void print_tree(struct tree* tree,int offset){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct tree* find_minimum(struct tree *root){
|
|
||||||
if(root == NULL){
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
else if(root->left != NULL){
|
|
||||||
return find_minimum(root->left);
|
|
||||||
}
|
|
||||||
return root;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void destroy_tree(struct tree* root){
|
void destroy_tree(struct tree* root){
|
||||||
if(root == NULL) return;
|
if(root == NULL) return;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user