mirror of
https://github.com/TheAlgorithms/C
synced 2024-11-22 05:21:49 +03:00
9bbec45d13
* 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>
29 lines
671 B
C
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();
|