Exam 18: Stacks and Queues

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

A static queue can be implemented as a(n) ___________.

(Multiple Choice)
4.9/5
(41)

If data is transmitted faster than it can be processed, it can be held in a ___________ for processing.

(Multiple Choice)
4.8/5
(35)

A queue is a data structure that stores and retrieves items in this manner.

(Multiple Choice)
4.8/5
(38)

Queues that are implemented as arrays are called ____________ queues.

(Multiple Choice)
4.8/5
(32)

Data structures that can dynamically store elements and can grow and shrink in size are:

(Multiple Choice)
4.7/5
(34)

A stack that is implemented as a linked list is known as a deque.

(True/False)
4.9/5
(37)

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

(Multiple Choice)
4.9/5
(42)

This is a double-ended queue.

(Multiple Choice)
4.9/5
(44)

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

(Multiple Choice)
4.8/5
(46)

The STL provides containers for deque and queue.

(True/False)
4.9/5
(36)

The pop function in the stack template does not retrieve the value from the top of the stack. It merely removes it.

(True/False)
4.8/5
(37)

A(n) _________ is an abstract data type that stores and retrieves items in a last-in-first-out manner.

(Multiple Choice)
4.7/5
(31)

The Standard Template Library offers a stack template that may be implemented as a:

(Multiple Choice)
4.9/5
(38)

The following statement stack< int, vector<int> > iStack; Indicates:

(Multiple Choice)
4.9/5
(39)

The ___________ operation allows an item to be removed from a stack.

(Multiple Choice)
5.0/5
(36)

A real-world example of the queue data structure can be seen in a stack of cafeteria trays, where the last tray pushed onto the stack is the first tray removed.

(True/False)
4.8/5
(38)

___________ queues are more intuitive and easier to understand than ______ queues.

(Multiple Choice)
4.8/5
(35)

In a static stack class, the constructor function can dynamically allocate memory for the stack array.

(True/False)
4.7/5
(47)

A stack has two primary operations:

(Multiple Choice)
4.9/5
(37)

A stack can be adapted to store _________ data types.

(Multiple Choice)
4.8/5
(37)
Showing 21 - 40 of 46
close modal

Filters

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