aboutsummaryrefslogtreecommitdiff
path: root/semestre 3/structures des données/td/td2/LDC.h
blob: 78524d3188108188099a5f7083859aa5fc88a44d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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