diff options
Diffstat (limited to 'collections')
-rw-r--r-- | collections/double_ended_queue.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/collections/double_ended_queue.c b/collections/double_ended_queue.c index 29c8873..25f3181 100644 --- a/collections/double_ended_queue.c +++ b/collections/double_ended_queue.c @@ -11,6 +11,17 @@ * (resize, push, etc.) */ +/*TODO + * Fix empty vs totally full ambiquity + */ + +/* Double ended queue as a circular buffer + * base is pointer to buffer. + * beg is where the first element is stored. + * end is where the last element is stored. + * limit is the maximum number of elements. + */ + struct double_ended_queue { void **base, **end, **beg; int limit; |