Close
Register
Close Window

BM40A1500 Data Structures and Algorithms

Chapter 2 Linear Data Structures

Show Source |    | About   «  2.7. Queues   ::   Contents   ::   2.9. Searching in an Array  »

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.1. Linked Enqueue

Settings

Proficient Saving... Error Saving
Server Error
Resubmit

2.8.2. Linked Dequeue

Settings

Proficient Saving... Error Saving
Server Error
Resubmit

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.

   «  2.7. Queues   ::   Contents   ::   2.9. Searching in an Array  »

nsf
Close Window