void printlist(node_t *head)
Prints all the values in the linked list.
Definition linkedlist.c:14
void insert_after_node(node_t *node_to_insert_after, node_t *newnode)
Inserts a new node after a given node.
Definition linkedlist.c:48
node_t * find_node(node_t *head, int value)
Finds the first node with a given value.
Definition linkedlist.c:38
node_t * create_new_node(int value)
Creates a new node with a given integer value.
Definition linkedlist.c:24
void free_list(node_t *head)
Frees all nodes in the linked list.
Definition linkedlist.c:5
node_t * insert_at_head(node_t **head, node_t *node_to_insert)
Inserts a node at the head of the list.
Definition linkedlist.c:32
struct node node_t
A node in the singly linked list.
A node in the singly linked list.
Definition linkedlist.h:22
struct node * next
Pointer to the next node in the list.
Definition linkedlist.h:24
int value
The integer value stored in the node.
Definition linkedlist.h:23