Exam 8: Queues
Exam 1: Review of Java Fundamentals60 Questions
Exam 2: Principles of Programming and Software Engineering60 Questions
Exam 3: Recursion: the Mirrors60 Questions
Exam 4: Data Abstraction: The Walls60 Questions
Exam 5: Linked Lists60 Questions
Exam 6: Problem Solving With Abstract Data Types60 Questions
Exam 7: Stacks60 Questions
Exam 8: Queues60 Questions
Exam 9: Advanced Java Topics60 Questions
Exam 10: Algorithm Efficiency and Sorting60 Questions
Exam 11: Trees60 Questions
Exam 12: Tables and Priority Queues60 Questions
Exam 13: Advanced Implementations of Tables60 Questions
Exam 14: Graphs60 Questions
Exam 15: External Methods30 Questions
Select questions type
Give two examples of run-time errors or exceptions that may occur when we enqueue or dequeue.
Free
(Essay)
4.9/5
(41)
Correct Answer:
It's an error to attempt to dequeue from an empty queue.Also,if the queue is represented as an array and we try to enqueue,we may run up against the maximum size of the queue.
The ______ operation retrieves the item that was added earliest to a queue,but does not remove that item.
Free
(Multiple Choice)
4.8/5
(40)
Correct Answer:
D
Operations on a queue can be carried out at ______.
Free
(Multiple Choice)
4.8/5
(39)
Correct Answer:
C
In an event-driven simulation of a bank,which of the following is an internal event?
(Multiple Choice)
4.9/5
(34)
To initialize a queue that is represented by a circular array,back is set to ______.
(Multiple Choice)
4.8/5
(38)
In an event-driven simulation of a bank,the departure times of customers are determined by the simulation.
(True/False)
4.7/5
(38)
A reference-based implementation of a queue that uses a circular linked list would need at least ______ external references.
(Multiple Choice)
4.9/5
(30)
Which of the following code fragments is used to delete the item at the front of a queue represented by a circular array?
(Multiple Choice)
4.8/5
(47)
The Java ______ operator is used to obtain the wraparound effect of a circular array-based queue.
(Multiple Choice)
4.8/5
(32)
Define the problem of rightward drift in an array-based implementation of a queue.
(Essay)
4.7/5
(36)
If a queue is implemented as the ADT list,which of the following queue operations can be implemented as list.get(1)?
(Multiple Choice)
4.8/5
(36)
Which of the following methods of QueueInterface does NOT throw a QueueException?
(Multiple Choice)
5.0/5
(48)
In an event-driven simulation of a bank,which of the following equations can be used to determine the time of a customer's departure?
(Multiple Choice)
4.9/5
(39)
What is the advantage an implementation of a queue that uses the ADT list over an implementation that uses a linked list?
(Essay)
4.8/5
(35)
To initialize a queue that is represented by a circular array,front is set to ______.
(Multiple Choice)
4.9/5
(28)
Rightward drift is a problem that is encountered in a reference-based implementation of a queue.
(True/False)
4.8/5
(39)
Showing 1 - 20 of 60
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)