CMSC 420, Section 0101, Spring 2002
Due: Feb. 7, 2002
You are required to manage
insertions and deletions into a set of K queues Q1,..,QK
using a fixed length array A[1,..,K].
- (4 points) Describe the data structures you
would use for this problem. Explain how these data structures are
initialized and what your conventions are for a FULL queue and an EMPTY
- (10 points) Write, in pseudocode, an algorithm
called insert(value,I) which inserts a value into queue QI.
Your algorithm should handle overflows, and where appropriate, it should
reorganize the location of queues in A.
- (6 points) Write, in pseudocode, an algorithm
called delete(I) which deletes the element at the front of queue QI.
Your algorithm should report an underflow error if QI is emty.