[SOLVED] Computer Science 230 Homework 3

23.99 $

Programming resource
Digital learning resource
Category:
Practical programming resource
Suitable for guided study and reference
Tutor guidance available when needed

Description

Rate this product

Assignment:

We haven’t done anything with a circular
structure. Amazingly, if we implement the linked queue with a circle, we can do
away with the front reference and have only a rear reference. (We cannot keep front and eliminate rear,
or at least it is inefficient to do so.)

This implementation has no dummy nodes, so
don’t forget that you may need to change what rear
itself is pointing to. Also, the empty queue (starting from empty or becoming
empty) may be a special case.

Part 1: Write the Java code or pseudocode for
enqueue() for the singly-linked circular queue
implementation with a rear, NO front,
and no dummy node.

Part 2: Write the Java code or pseudocode for
dequeue() for the singly-linked circular queue
implementation with a rear, NO front,
and no dummy node. Use the version of dequeue() that deletes the node from the
queue and returns the value that was in it.

Submission:

Put your name in
all files that you submit. Submit this file as <yourName.<ext, where WebCT by the date and time above.

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.