This commit is contained in:
Maryna Kravtsova 2020-11-22 16:29:45 +01:00
parent 736cd37d5b
commit 9bc82f2b39

View File

@ -42,12 +42,12 @@ void search(struct tree* this){
int x = strlen(buffer);
buffer[x-1]='\0';
/*if(this == NULL){
if(buffer[0] == '\n'){
return;
} */
}
if(buffer[0] == 'a'){
if(this->value[0] == '*'){
printf("%s\n", this->value);
if(this->left->value[0] == '*'){
printf("%s\n", this->left->value);
return;
}
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){
if(root == NULL) return;