Record - answerData structure that stores subitems, w/ names associated w/ each
subitem
Array - answerData structure that stores an ordered list of items, w/ each item directly
accessible by a positional index.
Linked List - answerData structure that stores an ordered list as nodes, each node
stores data and has a pointer to the next node.
Binary Tree - answerData structure where each node stores data and has up to two
children, left child and right child.
Hash Table - answerData structure that stores unordered items by mapping each item
to a location in an array.
Max Heap - answerTree that maintains the simple property that a node's key is greater
than or equal to a node's children key.
Min Heap - answerA tree that maintains simple property that node's key is less than or
equal to the node's children key.
Graph - answerRepresents connections among items. Consists of vertices and edges.
Vertex represents an item on a graph. Edges represent a connection between two
vertices.
Abstract Data Type (ADT) - answerData type described by predefined user operations.
Does not say anything about the implementation.
List - answerCommon ADT for holding ordered data.Like an array. Can store ints,
strings.
Ex. nums = [5, 25, 30]
Queue - answerADT 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.
Dictionary - answerMaps keys to values. Uses {}. The value can be number,string, or
tuple. Can be any type.
ex. players = {
, 'Lionel Messi': 10,
'Christiano Ronaldo': 7
}
If else statement - answerBranching 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.
Multiple if else statements - answerelif 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:
price = age_25_to_39
else:
price = age_40_up
Boolean Operators - answerIn python must True / False must be capitalized.
Has 3 operators: and / or / not
(age > 16) and (age < 25)
(age > 16) or (days > 10)
not (days > 10)
Membership Operators - answernot , in
Cannot check for values but can check for keys.
ex.
my_dict = {'A': 1, 'B': 2, 'C': 3}
if 'B' in my_dict:
print("Found 'B'")
else:
print("'B' not found")
# Membership operator does not check values
if 3 in my_dict:
print('Found 3')
else:
print('3 not found')
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller Dreamer252. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $16.99. You're not tied to anything after your purchase.