C949 Data Structures and Algorithms || A+ Certified.
Data structure that stores subitems, w/ names associated w/ each subitem correct answers Record
Data structure that stores an ordered list of items, w/ each item directly accessible by a positional
index. correct answers Array
Data structure that stores an ordered list as nodes, each node stores data and has a pointer to the
next node. correct answers Linked List
Data structure where each node stores data and has up to two children, left child and right child.
correct answers Binary Tree
Data structure that stores unordered items by mapping each item to a location in an array. correct
answers Hash Table
Tree that maintains the simple property that a node's key is greater than or equal to a node's
children key. correct answers Max Heap
A tree that maintains simple property that node's key is less than or equal to the node's children
key. correct answers Min Heap
Represents connections among items. Consists of vertices and edges. Vertex represents an item
on a graph. Edges represent a connection between two vertices. correct answers Graph
Data type described by predefined user operations. Does not say anything about the
implementation. correct answers Abstract Data Type (ADT)
Common ADT for holding ordered data.Like an array. Can store ints, strings.
Ex. nums = [5, 25, 30] correct answers List
, ADT where items are inserted at the end of the queue and removed at the front of the queue. First
in first out ADT.
push - inserts items at the end of the queue
pop - removes and returns the item at the front of the queue. correct answers Queue
Maps keys to values. Uses {}. The value can be number,string, or tuple. Can be any type.
ex. players = {
'Lionel Messi': 10,
'Christiano Ronaldo': 7
} correct answers Dictionary
Branching directs programs to execute either one group of statements or another.
ex.
if expression:
# Statements to execute when expression is true
else:
# Statements to execute when expression is false
# Statements here execute after the if-else. correct answers If else statement
elif used when two or more branches.
if age <= 15:
print('Too young for car insurance.')
price = 0
elif age <= 24:
price = age_16_to_24
elif age <= 39:
Data structure that stores subitems, w/ names associated w/ each subitem correct answers Record
Data structure that stores an ordered list of items, w/ each item directly accessible by a positional
index. correct answers Array
Data structure that stores an ordered list as nodes, each node stores data and has a pointer to the
next node. correct answers Linked List
Data structure where each node stores data and has up to two children, left child and right child.
correct answers Binary Tree
Data structure that stores unordered items by mapping each item to a location in an array. correct
answers Hash Table
Tree that maintains the simple property that a node's key is greater than or equal to a node's
children key. correct answers Max Heap
A tree that maintains simple property that node's key is less than or equal to the node's children
key. correct answers Min Heap
Represents connections among items. Consists of vertices and edges. Vertex represents an item
on a graph. Edges represent a connection between two vertices. correct answers Graph
Data type described by predefined user operations. Does not say anything about the
implementation. correct answers Abstract Data Type (ADT)
Common ADT for holding ordered data.Like an array. Can store ints, strings.
Ex. nums = [5, 25, 30] correct answers List
, ADT where items are inserted at the end of the queue and removed at the front of the queue. First
in first out ADT.
push - inserts items at the end of the queue
pop - removes and returns the item at the front of the queue. correct answers Queue
Maps keys to values. Uses {}. The value can be number,string, or tuple. Can be any type.
ex. players = {
'Lionel Messi': 10,
'Christiano Ronaldo': 7
} correct answers Dictionary
Branching directs programs to execute either one group of statements or another.
ex.
if expression:
# Statements to execute when expression is true
else:
# Statements to execute when expression is false
# Statements here execute after the if-else. correct answers If else statement
elif used when two or more branches.
if age <= 15:
print('Too young for car insurance.')
price = 0
elif age <= 24:
price = age_16_to_24
elif age <= 39: