This commit is contained in:
kr820js 2024-04-26 12:12:36 +02:00
parent f4ce3af790
commit 471009b6bd

View File

@ -2,6 +2,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "binary_search_tree.h" #include "binary_search_tree.h"
node_t *build_tree(int *, size_t ); node_t *build_tree(int *, size_t );
void add_dereva(node_t* , int ); void add_dereva(node_t* , int );
void free_tree(node_t *); void free_tree(node_t *);
@ -17,6 +18,7 @@ node_t *build_tree(int *tree_data, size_t tree_data_len){
for(unsigned int i=1; i<tree_data_len; i++){ for(unsigned int i=1; i<tree_data_len; i++){
add_dereva( first, tree_data[i]); add_dereva( first, tree_data[i]);
} }
return first;
} }
void add_dereva(node_t* first, int number){ void add_dereva(node_t* first, int number){
node_t* buffer=first; node_t* buffer=first;