Exam 18: Stacks and Queues

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

Two primary queue operations are:

Free
(Multiple Choice)
4.7/5
(39)
Correct Answer:
Verified

B

A stack has two primary operations:

Free
(Multiple Choice)
4.9/5
(35)
Correct Answer:
Verified

B

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

Free
(Multiple Choice)
4.8/5
(35)
Correct Answer:
Verified

C

A dynamic queue can be implemented as a ________.

(Multiple Choice)
4.9/5
(36)

Stacks and queues can be implemented as arrays or linked lists.

(True/False)
4.7/5
(40)

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.) 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.)   Assume that the dequeue function, called in lines 4, 5, and 6, stores the number removed from the queue in the value variable. What will the statement in line 7 display? Assume that the dequeue function, called in lines 4, 5, and 6, stores the number removed from the queue in the value variable. What will the statement in line 7 display?

(Multiple Choice)
4.8/5
(33)

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

(Multiple Choice)
4.9/5
(37)

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
(39)

The queue data structure is commonly applied in connection with:

(Multiple Choice)
4.8/5
(36)

A ________ stack or queue is built around the linked-list.

(Multiple Choice)
4.9/5
(42)

A stack can be adapted to store ________ data types.

(Multiple Choice)
5.0/5
(32)

The ________ operation allows an item to be stored on a stack.

(Multiple Choice)
4.9/5
(36)

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.7/5
(36)

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

(Multiple Choice)
4.8/5
(26)

A practical application of the stack data type in a computer system is:

(Multiple Choice)
5.0/5
(42)

________ queues are more intuitive and easier to understand than ________ queues.

(Multiple Choice)
4.8/5
(37)

Endeque and deque are the two most common queue operations.

(True/False)
4.8/5
(35)

A dynamic stack has a ________ size, and is implemented as a(n)________.

(Multiple Choice)
4.9/5
(33)

A dynamic stack starts as an empty linked list.

(True/False)
4.7/5
(41)

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.) 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.)   Assume that the dequeue function, called in lines 4, and 6, stores the number removed from the queue in the value variable. What will the statement in line 7 display? Assume that the dequeue function, called in lines 4, and 6, stores the number removed from the queue in the value variable. What will the statement in line 7 display?

(Multiple Choice)
4.8/5
(31)
Showing 1 - 20 of 47
close modal

Filters

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