2.8. Linked Queues¶
The linked queue implementation is a straightforward adaptation of the linked list. Here is the linked queue class declaration.
2.8.3. Comparison of Array-Based and Linked Queues¶
All member functions for both the array-based and linked queue implementations require constant time. The space comparison issues are the same as for the equivalent stack implementations. Unlike the array-based stack implementation, there is no convenient way to store two queues in the same array, unless items are always transferred directly from one queue to the other.