diff options
Diffstat (limited to 'collections/double_ended_queue.h')
-rw-r--r-- | collections/double_ended_queue.h | 42 |
1 files changed, 31 insertions, 11 deletions
diff --git a/collections/double_ended_queue.h b/collections/double_ended_queue.h index 0c7bdce..1c717df 100644 --- a/collections/double_ended_queue.h +++ b/collections/double_ended_queue.h @@ -1,16 +1,36 @@ #ifndef VECTOR_H #define VECTOR_H -typedef struct vector vec; +typedef struct double_ended_queue deq; -vec* vec_new(); -vec* vec_with_capacity(int); -int vec_size(vec*); -void vec_push(vec*, void*); -void* vec_rmfirst(vec*); -void* vec_index(vec*, int); -void vec_free(vec*); -void* vec_pop(vec*); -void vec_print(vec*); -vec* vec_cp(vec*); +/*constructors*/ +deq* deq_new(); +deq* deq_with_capacity(int); + +/*management*/ +int deq_size(deq*); +int deq_capacity(deq*); +deq* deq_cp(deq*); +void deq_free(deq*); +void deq_print(vec*); + +/*data*/ +void deq_push(deq*, void*); +void* deq_rmfirst(deq*); +void* deq_index(deq*, int); + + + +/* + * swap + * resevee + * truncate + * front + * back + * push/pop front + * push/pop back + * swap_rm_front/back + * insert + * remove + */ #endif |