Skip to content

Commit e93ecda

Browse files
KylerKyler
authored andcommitted
Minor fixes
1 parent 9af798a commit e93ecda

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

data_structures/queue.c

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ void enque(int x) {
6262
}
6363
}
6464

65+
/**
66+
* Takes the next item from the Queue.
67+
*/
6568
int deque() {
6669
int returnData;
6770
if(head == NULL) {
@@ -76,3 +79,47 @@ int deque() {
7679
head->next = NULL;
7780
}
7881
}
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

Comments
 (0)