forked from TheAlgorithms/C
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Moving queue file to it's directory and creating include file f…
…or it (TheAlgorithms#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 <[email protected]> Co-authored-by: David Leal <[email protected]>
- Loading branch information
1 parent
3cfdbb0
commit 9bbec45
Showing
2 changed files
with
29 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
////////////////////////////////////////////////////////////////////////////////////// | ||
/// 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(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters