ArchiSys/TP/TP1/rendu/linked_list.h
2024-03-29 22:46:30 +01:00

19 lines
431 B
C

#include <stdbool.h>
typedef struct node {
void *data;
int key;
node *next;
} node;
typedef struct linkedList {
node *head;
} linkedList;
linkedList* createLinkedList();
void insertFirst(linkedList *list, int key, void *data);
node* deleteFirst(linkedList *list);
node* find(linkedList *list, int key);
node* deleteElement(linkedList *list, int key);
bool isEmpty(linkedList *list);
int length(linkedList *list);