ArchiSys/TP/TP1/rendu/linked_list.h

24 lines
487 B
C

#ifndef DEF_LLIST_H
#define DEF_LLIST_H
#include <stdbool.h>
typedef struct node {
void *data;
int key;
struct 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);
#endif