Exam 18: Stacks and Queues

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

Two primary queue operations are:

(Multiple Choice)
4.8/5
(35)

The pop function in the stack template of the STL does not retrieve the value from the top of the stack.

(True/False)
4.9/5
(34)

Push and pop are the two most common queue operations.

(True/False)
4.9/5
(37)

Static stacks have a ________ size, and are implemented as ___________.

(Multiple Choice)
4.7/5
(37)

In the following code, assume the myQueue object is a queue that can hold integers, and that value is an int variable. (The lines are numbered for reference purposes.) 1: myQueue.enqueue(0); 2: myQueue.enqueue(1); 3: myQueue.enqueue(2); 4: myQueue.dequeue(value); 5: cout << value << endl; Assume that the dequeue function, called in line 4, stores the number removed from the queue in the value variable. What will the statement in line 5 display?

(Multiple Choice)
4.9/5
(42)

When the program knows the exact contents of a list and can access any element on demand, the data structure is known as a stacked deque.

(True/False)
4.8/5
(40)
Showing 41 - 46 of 46
close modal

Filters

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