There was an error while loading. Please reload this page.
1 parent 9af798a commit e93ecdaCopy full SHA for e93ecda
1 file changed
data_structures/queue.c
@@ -62,6 +62,9 @@ void enque(int x) {
62
}
63
64
65
+/**
66
+ * Takes the next item from the Queue.
67
+ */
68
int deque() {
69
int returnData;
70
if(head == NULL) {
@@ -76,3 +79,47 @@ int deque() {
76
79
head->next = NULL;
77
80
78
81
82
+
83
84
+ * Returns the size of the Queue.
85
86
+int size() {
87
+ return count;
88
+}
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
0 commit comments