Exam 8: Queues
Exam 1: Basic Python Programming51 Questions
Exam 2: An Overview of Collections50 Questions
Exam 3: Searching, Sorting, and Complexity Analysis50 Questions
Exam 4: Arrays and Linked Structures50 Questions
Exam 5: Interfaces, Implementations, and Polymorphism50 Questions
Exam 6: Inheritance and Abstract Classes50 Questions
Exam 7: Stacks50 Questions
Exam 8: Queues50 Questions
Exam 9: Lists50 Questions
Exam 10: Trees50 Questions
Exam 11: Sets and Dictionaries50 Questions
Exam 12: Graphs50 Questions
Select questions type
When using a circular array implementation for a queue, when either pointer is about to run off the end of the array, that pointer is reset to -1.
Free
(True/False)
4.7/5
(30)
Correct Answer:
False
When using a circular array implementation for a queue, during the add operation, the front pointer moves ahead of the rear pointer.
Free
(True/False)
4.9/5
(33)
Correct Answer:
False
When items are added to a priority queue, they are assigned an order of rank.
Free
(True/False)
4.7/5
(45)
Correct Answer:
True
What can you do if items in a priority queue cannot use the comparison operators?
(Multiple Choice)
4.8/5
(42)
In a priority queue, items waiting in the queue the longest are always popped next.
(True/False)
4.9/5
(27)
An example of a computer simulation that can use queues is traffic flow on a busy highway.
(True/False)
4.7/5
(42)
In computer science, process scheduling can be handled by simple or priority queues.
(True/False)
4.8/5
(35)
In the array implementation of a queue, the pop operation is most efficient if the front of the queue is fixed at index position 0.
(True/False)
4.9/5
(32)
In the supermarket simulation, which of the following would be a property of a Cashier object?
(Multiple Choice)
4.9/5
(43)
In a priority queue, what does the add method do when handling a new item and the new item is greater than or equal to the item at the rear?
(Multiple Choice)
4.7/5
(32)
When items are removed from a priority queue, items of lower priority are removed before those of higher priority.
(True/False)
4.9/5
(34)
The add operation for a queue adds a node at the head of the structure.
(True/False)
4.9/5
(35)
Simulation programs can use a range of integer values to mimic variability in the simulation.
(True/False)
4.9/5
(34)
What must occur when a wrapped item is accessed with the peek or pop method in a priority queue?
(Multiple Choice)
4.8/5
(36)
In a linked implementation of a queue, what does the add operation do?
(Multiple Choice)
4.9/5
(38)
Showing 1 - 20 of 50
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)