diff options
Diffstat (limited to 'semestre 3/structures des données/td/td2/LDC.h')
| -rw-r--r-- | semestre 3/structures des données/td/td2/LDC.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/semestre 3/structures des données/td/td2/LDC.h b/semestre 3/structures des données/td/td2/LDC.h new file mode 100644 index 0000000..78524d3 --- /dev/null +++ b/semestre 3/structures des données/td/td2/LDC.h @@ -0,0 +1,39 @@ +#ifndef LDC_H +#define LDC_H + +typedef struct cell { + struct cell* after; + struct cell* before; + int val; +} Cell; + +typedef struct { + Cell* first; + Cell* last; +} ChainedList; + +Cell* creerElement(int val); + +ChainedList* initialiserListe(ChainedList* list); + +ChainedList* creerListe(); + +int listeVide(ChainedList* list); + +void insererEnTete(ChainedList* list, int val); + +void insererEnFin(ChainedList* list, int val); + +void afficher(ChainedList* list); + +ChainedList* rechercher(ChainedList* list, int val); + +void supprimerElement(ChainedList* list, Cell* el); + +void supprimerTete(ChainedList* list); + +void supprimerFin(ChainedList* list); + +void desalloueListe(ChainedList* list); + +#endif // !LDC_H |
