queue data structure question
i am working on a small confidential project for my office. you can provide theoretical answers if necessary.
how do i implement queue data structure in:
1. ArrayQueue.h/ArrayQueue.cpp : using an array
2. LListQueue.h/LListQueue.cpp : using a linked list
any help is appreciated, thanks in advance.
Re: queue data structure question
1. ArrayQueue - There is no direct C++ version but you can get close by using std::queue<T> which is based around a deque.
2. ListQueue - Use std::queue< T, std::list<T> > - queue using a doubly linked list instead of a deque.