aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--collections/double_ended_queue.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/collections/double_ended_queue.c b/collections/double_ended_queue.c
index 232fb44..7857c3a 100644
--- a/collections/double_ended_queue.c
+++ b/collections/double_ended_queue.c
@@ -71,6 +71,16 @@ deq *root;
return (root->limit - root->beg) + (root->end);
}
+int deq_capacity(root)
+deq *root;
+{
+ if (!root) {
+ return -1;
+ } else {
+ return root->limit;
+ }
+}
+
void deq_resize(root)
deq *root;
{