From e93ecda453347780e5ff483b8f8f1db8bfdd262f Mon Sep 17 00:00:00 2001 From: Kyler Date: Mon, 17 Jul 2017 19:13:45 -0700 Subject: [PATCH] Minor fixes --- data_structures/queue.c | 47 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/data_structures/queue.c b/data_structures/queue.c index 833728db3..bad3d9a04 100644 --- a/data_structures/queue.c +++ b/data_structures/queue.c @@ -62,6 +62,9 @@ void enque(int x) { } } +/** + * Takes the next item from the Queue. + */ int deque() { int returnData; if(head == NULL) { @@ -76,3 +79,47 @@ int deque() { head->next = NULL; } } + +/** + * Returns the size of the Queue. + */ +int size() { + return count; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +