diff options
Diffstat (limited to 'collections/double_ended_queue.c')
-rw-r--r-- | collections/double_ended_queue.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/collections/double_ended_queue.c b/collections/double_ended_queue.c index 1f18330..ac9c131 100644 --- a/collections/double_ended_queue.c +++ b/collections/double_ended_queue.c @@ -192,3 +192,23 @@ int size; root->end = root->beg + size; } + +void* deq_front(root) +deq *root; +{ + if (!root) { + return; + } + + return *root->beg; +} + +void* deq_back(root) +deq *root; +{ + if (!root) { + return; + } + + return *root->end; +} |