Exam 7: Queues and Deques
Exam 1: P A C++ Primer25 Questions
Exam 2: Introduction to Software Design24 Questions
Exam 3: Program Correctness and Efficiency25 Questions
Exam 4: Inheritance and Class Hierarchies25 Questions
Exam 5: Sequential Containers25 Questions
Exam 6: Stacks24 Questions
Exam 7: Queues and Deques25 Questions
Exam 8: Recursion25 Questions
Exam 9: Trees25 Questions
Exam 10: Sets and Maps25 Questions
Exam 11: Sorting25 Questions
Exam 12: Self-Balancing Search Trees25 Questions
Exam 13: Graphs25 Questions
Exam 14: Advanced C++ Topics, and Overview of UML25 Questions
Select questions type
Which of the following is the critical line missing from the dequeu class pop_front () function?


Free
(Multiple Choice)
4.9/5
(30)
Correct Answer:
B
To run a computer simulation, we must keep track of the current time by maintaining a clock that is set to an initial time of __________.
Free
(Short Answer)
4.7/5
(32)
Correct Answer:
zero
In the Array_Queue.tc, the cost of reallocating is __________ across each insert operation.
Free
(Short Answer)
4.8/5
(35)
Correct Answer:
amortized
A(n) __________ is an abstract data type that combines the features of a stack and a queue.
(Short Answer)
4.7/5
(45)
The standard library defines the queue as a(n) __________ class that takes any of the sequential containers as a template parameter.
(Short Answer)
4.9/5
(38)
All three implementations of the Queue ADT are comparable in terms of computation time.
(True/False)
4.8/5
(40)
The number of elements in an instance of Linked_Queue.tc is changed by functions push and __________.
(Multiple Choice)
4.7/5
(27)
A queue is similar to a(n) __________ in that you can insert an item at one end and remove it from the other.
(Short Answer)
4.9/5
(26)
The current capacity of the deque is defined by the size of the circular array times the size of a(n) __________ block.
(Short Answer)
4.8/5
(43)
Shifting the elements in a queue based on a linear array is an __________ operation.
(Multiple Choice)
5.0/5
(24)
In the context of serving airline passengers, a(n) "__________" strategy would be to serve any frequent flyer waiting in line before serving the regular passengers.
(Multiple Choice)
4.8/5
(45)
Suppose that circular_queue, which is based on a circular array, stores the items 1, 1, 2, 3, 5, 8 in order from front to rear. If the first two items are deleted, which element does the rear marker point to?
(Multiple Choice)
4.9/5
(36)
Insertions are at the __________ of a queue, and removals are from the front.
(Short Answer)
4.9/5
(29)
Consider the following set of operations performed against a string type queue called my_queue.
Which string is output?

(Multiple Choice)
4.8/5
(35)
In the simulation for serving airline customers, the queue data structure is utilized to store Agent objects.
(True/False)
4.7/5
(36)
__________ is a technique used to study the performance of a physical system by using a physical, mathematical, or computer model of the system.
(Short Answer)
4.9/5
(37)
If exercised first, which of the following choices in the Maintain_Queue program will cause a run-time error?
(Multiple Choice)
4.7/5
(44)
The std::deque supports random-access __________ (not supported by either the stack or the queue).
(Short Answer)
4.9/5
(35)
Showing 1 - 20 of 25
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)