Designing algorithms requires
- Techniques - data structures / dynamic programming / depth-first / backtracking ...
- Resources - starting points / similar problems with their solutions
The algorithm Design Manual: Online material
- Permutations
- Subsets
- Trees
- Graphs
- Points
- Polygons
- Strings
Model the problem correctly before trying to solve it!
Worst case complexity is the most useful measure in practice than Best/Average (Average is often hard to define)
Random Access Machine - used to model complexity of a solution. A simplified model of how computations are executed.
- 1 step = simple ops (+, -, *, if, function call) Or memory access
- n steps = Loops / subroutines