This commit is contained in:
Maryna Kravtsova 2020-11-21 17:00:44 +01:00
parent 9fab76cb35
commit a30bf7ed16

View File

@ -36,12 +36,12 @@ struct tree* read_tree(){
return create_node(); return create_node();
}*/ }*/
if(buffer[0] != '*'){ if(buffer[0] != '*'){
//if(node->left == NULL){ if(node->left == NULL){
node->left = read_tree(); node->left = read_tree();
//} }
//if(node->right == NULL){ if(node->right == NULL){
node->right = read_tree(); node->right = read_tree();
//} }
} }
/*else if(string[0] == '*'){ /*else if(string[0] == '*'){
if(node->left == NULL){ if(node->left == NULL){
@ -51,9 +51,9 @@ struct tree* read_tree(){
strcpy(node->value, string); strcpy(node->value, string);
} }
}*/ }*/
if(node->left != NULL && node->right != NULL){ //if(node->left != NULL && node->right != NULL){
return node; return node;
} //}
} }
void print_tree(struct tree* node, int offset){ void print_tree(struct tree* node, int offset){