Data Structures Lerax  v3.0-101-gb1f7
Opinionated Data Structures & Algorithms
Loading...
Searching...
No Matches
list-circular.h File Reference

Go to the source code of this file.

Data Structures

struct  ListCircular
 A node in a circular singly linked list. More...

Macros

#define EMPTY_LIST_CIRCULAR   (ListCircular*) 0

Typedefs

typedef struct ListCircular ListCircular
 A circular singly linked list.

Functions

ListCircularlist_circular_create (void)
 Creates an empty circular list.
int list_circular_empty (ListCircular *l)
 Checks if a circular list is empty.
ListCircularlist_circular_insert (ListCircular *l, int data)
 Inserts a new element at the beginning of a circular list.
ListCircularlist_circular_remove (ListCircular *l, int data)
 Removes an element from a circular list.
ListCircularlist_circular_search (ListCircular *l, int data)
 Searches for an element in a circular list.
void list_circular_print (ListCircular *l)
 Prints the elements of a circular list to the console, followed by a newline character.
void list_circular_println (ListCircular *l)
 Prints the elements of a circular list to the console, followed by a newline character.
void list_circular_free (ListCircular *l)
 Frees the memory allocated for a circular list.
ListCircularlist_circular__new_node (int data)
 Creates a new node for a circular list.

Macro Definition Documentation

◆ EMPTY_LIST_CIRCULAR

#define EMPTY_LIST_CIRCULAR   (ListCircular*) 0

Typedef Documentation

◆ ListCircular

typedef struct ListCircular ListCircular

A circular singly linked list.

A ListCircular is a pointer to the first node in the list. An empty list is represented by a null pointer.