Chapter 19 Flashcards
(47 cards)
A(n) ________ is an abstract data type that stores and retrieves items in a last-in-first-out manner.
A) array
B) queue
C) stack
D) vector
E) None of these
C
A dynamic stack has a ________ size, and is implemented as a(n) ________.
A) variable, linked list
B) fixed, linked list
C) variable, array
D) fixed, array
E) None of these
A
The ________ operation allows an item to be stored on a stack.
A) append
B) add
C) pop
D) push
E) None of these
D
The Standard Template Library offers a stack template that may be implemented as a:
A) vector
B) deque
C) linked list
D) All of these
E) None of these
D
The following statement:
stack< int, vector<int> > iStack;
indicates:
A) a new stack of integers, implemented as a vector
B) a new stack of integers, implemented as a deque
C) a new stack named vector, implemented as integers
D) a new vector named stack, implemented with integers
E) None of these</int>
A
The queue data structure is commonly applied in connection with:
A) managing the order of print jobs
B) communications software
C) operating systems
D) All of these
E) None of these
D
Two primary queue operations are:
A) push and pop
B) enqueue and dequeue
C) insert and delete
D) onqueue and offqueue
E) None of these
B
A static queue can be implemented as a ________.
A) circular array
B) stack
C) dynamic linked list
D) dynamic vector
E) None of these
A
This is a double-ended queue.
A) two-headed stack
B) two-tailed vector
C) circular array
D) deque
E) None of these
D
A ________ stack or queue is built around the linked-list.
A) dynamic
B) static
C) deque-based
D) floating point
E) None of these
A
This is a container that provides quick access to elements at the front and the back of the list.
A) stack
B) queue
C) deque
D) All of these
E) None of these
C
_______ queues are more intuitive and easier to understand than ________ queues.
A) Static, dynamic
B) Dynamic, static
C) Deque-like, stack-like
D) Stack-like, deque-like
E) None of these
B
Data structures that can dynamically store elements and can grow and shrink in size are:
A) stacks
B) queues
C) deques
D) All of these
E) None of these
D
Stacks are useful data structures for algorithms that work ________ with the ________ saved element in the
series.
A) last, first
B) first, last
C) efficiently, first
D) efficiently, last
E) None of these
B
tatic stacks have a ________ size, and are implemented as ________.
A) fixed, linked lists
B) variable, arrays
C) fixed, arrays
D) variable, linked lists
E) None of these
C
A stack has two primary operations:
A) push and pull
B) push and pop
C) insert and delete
D) append and delete
E) None of these
B
he ________ operation allows an item to be removed from a stack.
A) push
B) pop
C) delete
D) remove
E) None of these
B
dynamic stack may be implemented as a(n) ________, and expand or shrink with each push or pop
operation.
A) array
B) structure
C) linked list
D) A and B
E) None of these
C
A queue is a data structure that stores and retrieves items in this manner.
A) last in, first out
B) first in, first out
C) first in, last out
D) random
E) None of these
B
A ________ is processed in a manner similar to customers standing in a grocery check-out line—the first
customer in line is the first served.
A) stack
B) vector
C) queue
D) All of these
E) None of these
C
When an element is added to a queue, it is added to the rear. When an element is removed, it is removed
from the ________.
A) rear
B) middle
C) front
D) All of these
E) None of these
C
In a dequeue operation, the element at the ________ of the queue is removed.
A) middle
B) front
C) declaration
D) mid-point
E) None of these
B
A dynamic queue can be implemented as a ________.
A) dynamic linked list
B) fixed-length array
C) fixed-length circular array
D) All of these
E) None of these
A
Queues that are implemented as arrays are called ________ queues.
A) dynamic
B) stack
C) static
D) deque
E) None of these
C