home *** CD-ROM | disk | FTP | other *** search
/ ftp.disi.unige.it / 2015-02-11.ftp.disi.unige.it.tar / ftp.disi.unige.it / pub / .person / CataniaB / teach-act / esempi / Tipi_di_dato / Alberi / trees.h < prev   
C/C++ Source or Header  |  1997-05-11  |  561b  |  28 lines

  1. typedef struct node * tree;
  2. struct  node 
  3.     { 
  4.       int   root; 
  5.       tree  left;
  6.       tree  right; 
  7.     };
  8.  
  9. tree   emptytree(void);              /* albero vuoto */
  10.  
  11. int    is_empty_tree(tree);           /* tree e' vuoto? */      
  12.  
  13. tree    maketree(int root,tree left,tree right);       
  14.        /* Costruttore di alberi, dati: root,left,right 
  15.         * restituisce l'albero T con radice root di left & right */ 
  16.  
  17. int    root(tree);
  18.  
  19. int    length(tree);
  20.  
  21. void   dfs(tree);
  22.  
  23. void   bfs(tree);
  24.  
  25. int    append(int,tree,tree,tree); 
  26.  
  27. void   copy(tree,tree*);
  28.