Blame view

tree.c 224 Bytes
500d264d   bjeanlou   create tree ch Sl...
1
  #include "tree.h"
2a10535a   bjeanlou   end Lesson 1
2
3
4
5
6
7
8
9
10
11
12
13
14
  
  tree make_empty_tree(){
    return NULL;
  }
  int is_empty(tree t){
    return t==NULL;
  }
  int is_leaf(tree t){
    return is_empty(t.next);//<=>t.val=='\0'
  }
  int is_end(tree t){
    return isIn_list(t.next,'\0');
  }