|
Data Structures Lerax
v3.0-101-gb1f7
Opinionated Data Structures & Algorithms
|
Go to the source code of this file.
Macros | |
| #define | EMPTY_QUEUE (Queue*) 0 |
| #define | QUEUE_STATIC_MAX 1000000 |
Typedefs | |
| typedef struct queue | Queue |
| A queue data structure. | |
Functions | |
| Queue * | queue_create (void) |
| Creates an empty queue. | |
| int | queue_empty (Queue *q) |
| Checks if a queue is empty. | |
| void | queue_insert (Queue *q, int data) |
| Inserts an element at the back of a queue. | |
| int | queue_remove (Queue *q) |
| Removes and returns the element at the front of a queue. | |
| void | queue_print (Queue *q) |
| Prints the elements of a queue to the console. | |
| void | queue_println (Queue *q) |
| Prints the elements of a queue to the console, followed by a newline character. | |
| void | queue_free (Queue *q) |
| Frees the memory allocated for a queue. | |
| void | queue_reverse (Queue *q) |
| Reverses the elements of a queue. | |
| int | queue_greater_than (Queue *q, int n) |
| Counts the number of elements in a queue that are greater than a given value. | |
| int | queue_evens (Queue *q) |
| Counts the number of even elements in a queue. | |
| #define EMPTY_QUEUE (Queue*) 0 |
| #define QUEUE_STATIC_MAX 1000000 |
| typedef struct queue Queue |
A queue data structure.
Copyright 2017-2025 Manoel Vilela
Author: Manoel Vilela
Contact: manoel_vilela@engineer.com
Organization: UFC