1/59
Looks like no tags are added yet.
record
the data structure that stores subitems, often called fields, with a name associated with each subitem.
array
a data structure that stores an ordered collection of elements, where each element is directly accessible by a positional index.
linked list
a data structure that stores an ordered list of items in nodes, where each node stores data and has a reference to the next node
binary tree
a data structure in which each node stores data and has up to two children, known as a left child and a right child
hash table
a data structure that stores unordered items by mapping each item to a location in an array.
max-heap
a tree that maintains the simple property that a node's key is greater than or equal to the node's children’s' keys
min-heap
a tree that maintains the simple property that a node's key is less than or equal to the node's children's key
graph
a data structure for representing connections among items, and consists of vertices connected by edges
vertex
represents an item in a graph
edge
represents a connection between two vertices in a graph
the main difference between a Python list and an array (as defined by the textbook)
Items in an array can be edited, but not added or removed. (i.e. arrays have a fixed size, Python lists do not)
one advantage of using a linked list over an array when additional items may need to be added to the data structure later
Adding an item to a linked list does not require shifting the items (using more memory, slowing down processes), while adding an item to an array almost always requires shifting the items
algorithm
a collection of rules or instructions that govern how a work is to be conducted step-by-step to achieve the desire results
the characteristics of an algorithm
clear and unambiguous, well-defined inputs, well-defined outputs, finite-ness, feasible, and language independent
data flow diagram
maps the flow of information for any process or system
external entity
a system that sends or receives data, also called a terminator, source, sink, or actor; drawn on the edges of a DFD
external entity (symbol)
rectangle
process
an action that changes data and produces an output; drawn with a short verb label
process (symbol)
circle
data store
a file or repository that holds information for later use, such as a database table; drawn with a simple noun label
data store (symbol)
incomplete rectangle
data flow
the route that data takes between entities, processes, and stores; drawn with a short name label
data flow (symbol)
arrow
in a DFD, each process must have…
at least one input and one output
in a DFD, each data store must have…
at least one data flow in and one data flow out
in a DFD, data stored in a system must…
move through a process
in a DFD, every process must lead to…
a process or a data store
DFD Level 0
shows a whole system as one high-level process and its relationships with external entitie
DFD Level 0 is also known as…
a context diagram
DFD Level 1
breaks a system into it’s main functions and shows how those functions exchange data with each other and with external entities
DFD Level 2
details the subprocesses inside a function
logical DFD
shows the essential data flows a business needs to operate, independent of technology
physical DFD
shows how the system is implemented, including files, hardware, and software
computational problem
specifies an input, a question about the input that can be answered using a computer, and the desired output
NP-complete problems
a set of problems for which no known efficient algorithm exists
the advantage of knowing a problem is NP-complete
instead of trying to find an efficient algorithm to solve the problem, a programmer can focus on finding an algorithm to efficiently find a good, but non-optimal, solution
an algorithm is considered efficient when…
it’s runtime increases no more than polynomially with respect to the input size
abstract data type (ADT)
described by predefined user operations without indicating how each operation is implemented
list
an ADT for holding ordered data
dynamic array
an ADT for holding ordered data and allowing indexed access
stack
an ADT in which items are only inserted or removed from the top
queue
an ADT in which items are inserted at the end and removed from the front
deque
an ADT in which items can be inserted and removed from both the front and the back
bag
an ADT for storing items in which the order does not matter and duplicate items are allowed
set
an ADT for a collection of distinct items
priority queue
an ADT in which items are inserted at the end and removed from the front where each item has a priority, and items with higher priority are closer to the front than items with lower priority
dictionary
an ADT that associates or maps keys with values
abstraction
to have a user interact with an item at a high-level, with lower-level internal details hidden
algorithm efficiency
measured by an algorithm’s computational complexity
computational complexity
the amount of resources used by the algorithm (runtime, memory, etc.)
runtime complexity
a function that represents the number of constant time operations performed by the algorithm
best case
the scenario where an algorithm does the minimum possible number of operations
worst case
the scenario where the algorithm does the maximum possible number of operations
space complexity
a function that represents the number of fixed-size memory units used by the algorithm
auxiliary space complexity
a function that represents the number of fixed-size memory units used by the algorithm, not including the input data
Huffman coding
a common compression technique that assigns fewer bits to frequent items
heuristic
a technique that willingly accepts a non-optimal or less accurate solution in order to improve execution speed
self-adjusting heuristic
an algorithm that modifies a data structure based on how that data structure is used
greedy algorithm
an algorithm that, when presented with a list of options, chooses the option that is optimal at that point in time
dynamic programming
a problem solving technique that splits a problem into smaller subproblems, computes and stores solutions to subproblems in memory, and then uses the stored solutions to solve the larger problem