1/27
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
A(n) ________ is an abstract data type that stores and retrieves items in a last-in-first-out manner.
stack
True/False: The first item placed onto a stack is always the last item removed from the stack.
True
A dynamic stack has a _____ size, and is implemented as a(n) _____
variable,inked list
The ________ operation allows an item to be stored on a stack.
push
True/False: A dynamic stack starts as an empty linked list.
True
The queue data structure is commonly applied in connection with
a. managing the order of print jobs
b. communication software
c. operating systems
d. all of the above
e. none of the above
all of the above
Two primary queue operations are
enqueue and dequeue
A static queue can be implemented as a
circular array
A ____ stack or queue is implemented using linked lists
dynamic
For most people, _____ queues are more intuitive and easier to understand than _____ queues
static, dynamic
True/ False: Enqueue and dequeue are the two most common stack operations
False
True/False: 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.
False
Stacks are useful data structures for algorithms that work with lists of items in a
last in, first out
Static stacks have a _____ size, and are implemented using _____.
fixed, array
A stack has two primary operations called
push and pop
The _____ operation allows an item to be removed from a stack
pop
True/ False: In a static stack class, the constructor function can dynamically allocate memory for the stack array
true
A dynamic stack may be implemented as a(n) ____, and expand or shrink with each push or pop operation
array or linked list
A queue is a data structure that stores and retrieve items in a _____ manner
first in, first out
A _____ is processed in a manner similar to customers standing in a grocery check-out line. The first customer in line
True/ False: Stacks and queues can be implemented as arrays or linked lists
True
When an element is added to a queue, it is added to the rear. When an element is removed, it is removed from the
front
A dynamic queue can be implemented as a
dynamic linked list
Queues that are implemented as arrays are called ____ queues.
static
True/ False: The programmer must declare in advance the size of a dynamic stack or queue
False
If information is transmitted faster than it can be processed, it can be held in a _____ while it awaits processing
queue
A practical application of the stack data type is
a. the storage of local variables in a function call
b. the tracking og the order of entry into and exit from nested loops
c. the tracking of the order of calls and returns of functions in a program
d. all of the above
e. none of the above
all of the above
True/ False: Push and Pop are the two most common queue operations
False