Exam 7: Queues and Deques

arrow
  • Select Tags
search iconSearch Question
  • Select Tags

Which of the following is the critical line missing from the dequeu class pop_front () function? 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:
Verified

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:
Verified

zero

In the Array_Queue.tc, the cost of reallocating is __________ across each insert operation.

Free
(Short Answer)
4.8/5
(35)
Correct Answer:
Verified

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)

A queue is a LIFO (last-in, first-out) list.

(True/False)
4.8/5
(33)

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. Consider the following set of operations performed against a string type queue called my_queue.   Which string is output? 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)

The last element placed in a queue is the only visible item.

(True/False)
4.8/5
(30)
Showing 1 - 20 of 25
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)