Question

State two auxiliary queue operations and specify what do they do? State two direct applications of...

  1. State two auxiliary queue operations and specify what do they do?
  1. State two direct applications of queues?
  1. State two indirect applications of queues?
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Auxiliary queue operations:

Along with the basic enqueue() and dequeue() operations, other auxiliary operations could be as follows:

1) isEmpty() : A function that returns a boolean as true if queue is empty, returns false if queue is not empty

2) front(): A function that returns the frontmost element in the list without actually removing it. This is very much similar to the poll() operation in stack.

3) size(): A function that returns the number of items/nodes present in the queue.

Direct Applications of Queue:

1) Waiting list: The most basic application of queue is that of a store of waiting list. The list is managed in first come first serve basis that could be used in many general applications.

2)Multiprogramming( Scheduling applications) : Queues are used in various scheduling algorithms like FCFS or Multilevel Queue Scheduling algorithm

3) Shared Resources management.: Queues are also used to manage shared resources like printer. These can be managed either by priority basis or quantum basis.

InDirect Applications of Queue:

1) Queues as a primary data structure for other algorithms: Queues can be used as a primary data structure in various other algorithms like Breadth-First-Search or Vertical Tree traversal.

2) As a component of other Data Structures: Queues can be used can a part of other data structures like a priorityqueue.

Add a comment
Know the answer?
Add Answer to:
State two auxiliary queue operations and specify what do they do? State two direct applications of...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT