what is an algorithm
an algorithm is a set of steps for solving an instance of a particular problem type
correctness
an algorithm should terminate for every input with the correct output.
efficiency
algorithmic analysis
how well an algorithm performs
linear search
binary search
linear search
binary search
algorithm families
exact methods
approximate methods
exact methods
calculate the solution with a guarantee of correctness, provides exact solution
brute force
exact method
/ generate and test
divide and conquer
exact method
Approximate methods
estimate the solution with how close it is to the exact solution
simulation
heuristic search
simulation
type of approximate method
heuristic search
type of approximate method
memoisation
technique to store the results of expensive function calls so that they can be reused later
used to improve efficiency when a function is called several times with the same input to avoid duplicate computation