diff options
author | Tucker Evans <tucker@tuckerevans.com> | 2020-05-27 04:39:59 -0400 |
---|---|---|
committer | Tucker Evans <tucker@tuckerevans.com> | 2020-05-27 04:39:59 -0400 |
commit | 735a88c02286a01c2a4edb8f7f6ccf0a93de24b0 (patch) | |
tree | 8e8ac894db1ced5c042546fda805a81e6577c1ec | |
parent | 533d7755f866257c78299561b2634a3ea54f9a87 (diff) |
Add brief description of double ended queue struct.
-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; |