This repository has been archived on 2026-05-01. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
Projet-C-Huffman/arbre_de_codage/arbre_binaire.h
2019-12-14 14:39:37 +01:00

24 lines
555 B
C

#ifndef __ARBRE_BINAIRE__
#define __ARBRE_BINAIRE__
typedef int bool;
struct znoeud {
int elt ;
int poids;
struct znoeud *fils_gauche;
struct znoeud *fils_droit;
};
typedef struct znoeud noeud ;
typedef struct znoeud * arbre;
arbre creer_arbre_vide(void);
arbre creer_arbre_huffman(int e, int p, arbre fg, arbre fd);
arbre fils_gauche(arbre a);
arbre fils_droit(arbre a);
int racine(arbre a);
bool est_arbre_vide(arbre a);
arbre creer_feuille(int e, int p) ;
bool est_feuille(arbre a) ;
char *arbre_rechercher(arbre a, char c, char*s);
#endif