TheAlgorithms-C/data_structures/queue/include.h
Lorenzo Battistela 9bbec45d13
feat: Moving queue file to it's directory and creating include file for it (#874)
* Putting queue in correct dir and creating include file for it

* Update data_structures/queue/include.h

missing one function, added

Co-authored-by: David Leal <halfpacho@gmail.com>

Co-authored-by: David Leal <halfpacho@gmail.com>
2021-10-15 11:28:04 -05:00

29 lines
671 B
C

//////////////////////////////////////////////////////////////////////////////////////
/// INCLUDES
#include <stdio.h>
#include <stdlib.h>
////////////////////////////////////////////////////////////////////////////////
// DATA STRUCTURES
/**
* Defining the structure of the node which contains 'data' (type : integer),
* two pointers 'next' and 'pre' (type : struct node).
*/
struct node
{
int data;
struct node *next;
struct node *pre;
} * head, *tail, *tmp;
////////////////////////////////////////////////////////////////////////////////
// FORWARD DECLARATIONS
void create();
void enque(int x);
int deque();
int peek();
int size();
int isEmpty();