Data Structures Lerax  v3.0-104-ge031
Opinionated Data Structures & Algorithms
Loading...
Searching...
No Matches
list-double.h
Go to the documentation of this file.
1
12
13#ifndef LIST_DOUBLE_H
14#define LIST_DOUBLE_H
15
22struct ListDouble {
23 int data;
26};
27
34typedef struct ListDouble ListDouble;
35
36#define EMPTY_LIST_DOUBLE (ListDouble*) 0
37
38
46
55
65
75
86
94
103
111
112/*********/
113/* UTILS */
114/*********/
115
124
125#endif
ListDouble * list_double_search(ListDouble *l, int data)
Searches for an element in a doubly linked list.
ListDouble * list_double_remove(ListDouble *l, int data)
Removes an element from a doubly linked list.
ListDouble * list_double_create(void)
Creates an empty doubly linked list.
ListDouble * list_double_insert(ListDouble *l, int data)
Inserts a new element at the beginning of a doubly linked list.
void list_double_println(ListDouble *l)
Prints the elements of a doubly linked list to the console, followed by a newline character.
void list_double_free(ListDouble *l)
Frees the memory allocated for a doubly linked list.
ListDouble * list_double__new_node(int data)
Creates a new node for a doubly linked list.
int list_double_empty(ListDouble *l)
Checks if a doubly linked list is empty.
void list_double_print(ListDouble *l)
Prints the elements of a doubly linked list to the console.
A node in a doubly linked list.
Definition list-double.h:22
int data
Definition list-double.h:23
struct ListDouble * prev
Definition list-double.h:25
struct ListDouble * next
Definition list-double.h:24