Deck 8: Abstract Data Types and Subprograms

Full screen (f)
exit full mode
Question
Which of the following is organized as a hierarchy?

A) List
B) Stack
C) Queue
D) Binary search tree
E) Graph
Use Space or
up arrow
down arrow
to flip the card.
Question
Which of the following scientists developed the basic computer architecture that continues to be used today?

A) Wernher von Braun
B) George Polya
C) Tony Hoare
D) John von Neumann
E) Richard Feynman
Question
An abstract data type (ADT) is a container whose properties (data and operations) are specified independently of any particular implementation.
Question
A binary tree cannot contain decimal (base-10) data.
Question
A directed graph is a graph whose edges go in only one direction.
Question
A(n) _______________ structure is based on the concept of a node and pointers between nodes.
Question
Adding an item to a stack is called the _______________ operation.
Question
A(n) _______________ is an abstract data type behaves in a manner similar to a waiting line at a bank or supermarket.
Question
In a(n) _______________ graph, the edges point from one node to another.
Question
In a(n) _______________ tree, the values stored in the nodes are organized to allow an item to be found efficiently.
Question
A(n) _______________ is an abstract data type that operates on a "first in, first out" (FIFO) manner.
Question
Give an example of the logical view of data if the problem is to print values in reverse order.
Question
What is a value parameter?
Question
An array is fixed sized, but a list is variable sized. Explain.
Question
What is a reference parameter?
Question
Give an example of the application view of data if the problem is to represent people in a waiting line.
Question
Give an example of the application view of data if the problem is to print values in reverse order.
Question
What is the role of a container?
Question
What are the properties of a binary tree?
Question
Which level provides a view that deals with the underlying data structure used to manage the data?

A) Implementation level
B) Logical level
C) Array level
D) Linked level
E) Application level
Question
Which of the following is an abstract data type that operates on a "last in, first out" (LIFO) manner?

A) Stack
B) Queue
C) List
D) Tree
E) Container
Question
Which of the following can be either directed or undirected?

A) List
B) Stack
C) Queue
D) Binary search tree
E) Graph
Question
Which of the following is made up of a set of nodes called vertices and a set of lines called edges (or arcs)?

A) List
B) Stack
C) Graph
D) Binary search tree
E) Linked structure
Question
What is the minimum number of nodes in a binary tree with 3 levels?

A) 1
B) 3
C) 7
D) 8
E) 16
Question
Which level provides an abstract view of data and the operations that manipulate them?

A) Implementation level
B) Logical level
C) Array level
D) Linked level
E) Application level
Question
The properties of an abstract data type are tightly related to the implementation of that data type.
Question
The effect of the following queue operations will be to print "HI": Enque(myQueue,'I'), Enque(myQueue,'H'), Dequeue(myQueue,value), Write value, Dequeue(myQueue, value), Write value.
Question
The operations on a stack occur at one end.
Question
A stack is managed in a FIFO manner.
Question
The root node in a tree has no children.
Question
The root node in a tree is the only node that does not have a parent.
Question
In a binary tree, each node has at most two child nodes.
Question
Parameters are the identifiers listed in parentheses beside a subprogram name.
Question
Non-value-returning subprograms must always have a RETURN statement.
Question
Which of the following would you use to represent airline flights between cities?

A) List
B) Stack
C) Queue
D) Binary search tree
E) Graph
Question
What is the maximum number of nodes in a binary tree with 3 levels?

A) 1
B) 3
C) 7
D) 8
E) 16
Question
The operations on a list differ depending on the implementation strategy used.
Question
A queue is similar to a waiting line at a bank.
Question
A leaf node has no child nodes.
Question
The root of a tree has no child nodes.
Question
In the parameter passing process, the substitution mechanism can be thought of as a message board.
Question
In order to answer the question of whether you can travel from Boston to Los Angeles on your favorite airline, you would use a(n) __________________ searching algorithm defined on a graph.
Question
In order to determine how you can fly from Boston to Los Angeles in the fewest number of stops, you would use a(n) _____________________ searching algorithm defined on a graph.
Question
A(n) _______________ is a data type whose data and operations are specified independently of any particular implementation.
Question
Removing an item from a stack is called the _______________ operation.
Question
In a(n) _______________ tree, each node has no more than two children.
Question
A graphical map with vertices representing the names of cities and with edges linking the vertices representing two-way roads between the cities is an example of a(n) _______________ graph.
Question
A(n)______________ graph is one in which there are values attached to the edges in the graph.
Question
In order to determine what the shortest flight in miles from Boston to Los Angeles would be, you would use a(n) ___________ searching algorithm defined on a graph.
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/49
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 8: Abstract Data Types and Subprograms
1
Which of the following is organized as a hierarchy?

A) List
B) Stack
C) Queue
D) Binary search tree
E) Graph
D
2
Which of the following scientists developed the basic computer architecture that continues to be used today?

A) Wernher von Braun
B) George Polya
C) Tony Hoare
D) John von Neumann
E) Richard Feynman
D
3
An abstract data type (ADT) is a container whose properties (data and operations) are specified independently of any particular implementation.
True
4
A binary tree cannot contain decimal (base-10) data.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
5
A directed graph is a graph whose edges go in only one direction.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
6
A(n) _______________ structure is based on the concept of a node and pointers between nodes.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
7
Adding an item to a stack is called the _______________ operation.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
8
A(n) _______________ is an abstract data type behaves in a manner similar to a waiting line at a bank or supermarket.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
9
In a(n) _______________ graph, the edges point from one node to another.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
10
In a(n) _______________ tree, the values stored in the nodes are organized to allow an item to be found efficiently.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
11
A(n) _______________ is an abstract data type that operates on a "first in, first out" (FIFO) manner.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
12
Give an example of the logical view of data if the problem is to print values in reverse order.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
13
What is a value parameter?
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
14
An array is fixed sized, but a list is variable sized. Explain.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
15
What is a reference parameter?
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
16
Give an example of the application view of data if the problem is to represent people in a waiting line.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
17
Give an example of the application view of data if the problem is to print values in reverse order.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
18
What is the role of a container?
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
19
What are the properties of a binary tree?
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
20
Which level provides a view that deals with the underlying data structure used to manage the data?

A) Implementation level
B) Logical level
C) Array level
D) Linked level
E) Application level
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
21
Which of the following is an abstract data type that operates on a "last in, first out" (LIFO) manner?

A) Stack
B) Queue
C) List
D) Tree
E) Container
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
22
Which of the following can be either directed or undirected?

A) List
B) Stack
C) Queue
D) Binary search tree
E) Graph
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
23
Which of the following is made up of a set of nodes called vertices and a set of lines called edges (or arcs)?

A) List
B) Stack
C) Graph
D) Binary search tree
E) Linked structure
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
24
What is the minimum number of nodes in a binary tree with 3 levels?

A) 1
B) 3
C) 7
D) 8
E) 16
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
25
Which level provides an abstract view of data and the operations that manipulate them?

A) Implementation level
B) Logical level
C) Array level
D) Linked level
E) Application level
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
26
The properties of an abstract data type are tightly related to the implementation of that data type.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
27
The effect of the following queue operations will be to print "HI": Enque(myQueue,'I'), Enque(myQueue,'H'), Dequeue(myQueue,value), Write value, Dequeue(myQueue, value), Write value.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
28
The operations on a stack occur at one end.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
29
A stack is managed in a FIFO manner.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
30
The root node in a tree has no children.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
31
The root node in a tree is the only node that does not have a parent.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
32
In a binary tree, each node has at most two child nodes.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
33
Parameters are the identifiers listed in parentheses beside a subprogram name.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
34
Non-value-returning subprograms must always have a RETURN statement.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
35
Which of the following would you use to represent airline flights between cities?

A) List
B) Stack
C) Queue
D) Binary search tree
E) Graph
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
36
What is the maximum number of nodes in a binary tree with 3 levels?

A) 1
B) 3
C) 7
D) 8
E) 16
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
37
The operations on a list differ depending on the implementation strategy used.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
38
A queue is similar to a waiting line at a bank.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
39
A leaf node has no child nodes.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
40
The root of a tree has no child nodes.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
41
In the parameter passing process, the substitution mechanism can be thought of as a message board.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
42
In order to answer the question of whether you can travel from Boston to Los Angeles on your favorite airline, you would use a(n) __________________ searching algorithm defined on a graph.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
43
In order to determine how you can fly from Boston to Los Angeles in the fewest number of stops, you would use a(n) _____________________ searching algorithm defined on a graph.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
44
A(n) _______________ is a data type whose data and operations are specified independently of any particular implementation.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
45
Removing an item from a stack is called the _______________ operation.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
46
In a(n) _______________ tree, each node has no more than two children.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
47
A graphical map with vertices representing the names of cities and with edges linking the vertices representing two-way roads between the cities is an example of a(n) _______________ graph.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
48
A(n)______________ graph is one in which there are values attached to the edges in the graph.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
49
In order to determine what the shortest flight in miles from Boston to Los Angeles would be, you would use a(n) ___________ searching algorithm defined on a graph.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 49 flashcards in this deck.