Data Structures Lerax 1.0.0
Essential Data Structures for C language
Loading...
Searching...
No Matches
queue.h File Reference

Go to the source code of this file.

Typedefs

typedef struct queue Queue

Functions

Queuequeue_create (void)
 Create a new queue.
int queue_empty (Queue *q)
 Check if the queueis empty.
void queue_insert (Queue *q, int data)
 Insert a new elemet on the queue.
int queue_remove (Queue *q)
 Remove and return the first element on the queue.
void queue_print (Queue *q)
 Print the queue (wthout newline)
void queue_println (Queue *q)
 Print the queue (wth a newline)
void queue_free (Queue *q)
 Free memory of thequeue structure.
void queue_reverse (Queue *q)
 Reverse the elemens of the queue.
int queue_greater_than (Queue *q, int n)
 Count the number o elements greater than n.
int queue_evens (Queue *q)
 Count the number o even elements on Queue.

Typedef Documentation

◆ Queue

typedef struct queue Queue

Function Documentation

◆ queue_create()

Queue * queue_create ( void )

Create a new queue.

◆ queue_empty()

int queue_empty ( Queue * q)

Check if the queueis empty.

◆ queue_evens()

int queue_evens ( Queue * q)

Count the number o even elements on Queue.

◆ queue_free()

void queue_free ( Queue * q)

Free memory of thequeue structure.

◆ queue_greater_than()

int queue_greater_than ( Queue * q,
int n )

Count the number o elements greater than n.

◆ queue_insert()

void queue_insert ( Queue * q,
int data )

Insert a new elemet on the queue.

◆ queue_print()

void queue_print ( Queue * q)

Print the queue (wthout newline)

◆ queue_println()

void queue_println ( Queue * q)

Print the queue (wth a newline)

◆ queue_remove()

int queue_remove ( Queue * q)

Remove and return the first element on the queue.

◆ queue_reverse()

void queue_reverse ( Queue * q)

Reverse the elemens of the queue.