diff --git a/tree.c b/tree.c new file mode 100644 index 0000000..9196ac8 --- /dev/null +++ b/tree.c @@ -0,0 +1,23 @@ +#include "trees.h" + +/* +typedef struct node { + int val; + struct node* fils[]; +}Node, *PtNode, *Tree; + */ + +void cons_tree(struct node **, int, struct node *) +{ + +} + +void mk_empty_tree(struct node **); + +int is_leaf(struct node *); + +void add(struct node **, int); + +void load_tree(FILE *, struct node **); + +void free_tree(struct node **); diff --git a/tree.h b/tree.h new file mode 100644 index 0000000..3a8d162 --- /dev/null +++ b/tree.h @@ -0,0 +1,19 @@ +#include +#include + +typedef struct node { + int val; + struct node* fils[]; +}Node, *PtNode, *Tree; + +void cons_tree(struct node **, int, struct node *); + +void mk_empty_tree(struct node **); + +int is_leaf(struct node *); + +void add(struct node **, int); + +void load_tree(FILE *, struct node **); + +void free_tree(struct node **); -- libgit2 0.21.2