-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathqueue.c
More file actions
73 lines (48 loc) · 1.1 KB
/
Copy pathqueue.c
File metadata and controls
73 lines (48 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#include<stdio.h>
#include<stdlib.h>
#include "DLL.h"
#define true 1
#define false 0
typedef struct Queue {
DLL* elements;
} Queue;
/*
In this function, you have to allocate space for queue using malloc function.
Then you have to initialize the elements DLL using the function createDLL() defined in DLL.h
Then you have to return the newly allocated and initialized queue.
*/
Queue* createQueue() {
}
/*
Use the appropriate function from the DLL.h file and perform the enqueue operation on queue.
*/
void enqueue(Queue* queue,int data) {
}
/*
Use the appropriate function from the DLL.h file and perform the dequeue operation on queue.
*/
void dequeue(Queue* queue) {
}
/*
Return true if queue is empty, else return false.
*/
int isEmpty(Queue* queue) {
}
/*
Get the frontmost node of the queue.
*/
DLLNode* getFront(Queue* queue) {
}
/*
Free all the memory occupied by queue.
Hint: while the queue is not empty, keep on dequeue.
Then free queue.
*/
void deleteQueue(Queue* queue) {
}
/*
You don't need to change this.
*/
int main() {
return 0;
}