feb 22
start decrease-and-conquer , chapter 5
- decrease-by-a-constant (typically N becomes N-1 on each iteration)
- decrease-by-constant-factor (typically N becomes N/2 on each iteration)
- decrease-by-variable-factor (e.g. Euler's method)
insertion sort
- similar idea to selection sort
- O(n**2)
- good for "almost sorted" arrays
depth-first and breadth-first searching
- discuss basic idea
- describe for general graphs, not just trees
- connections with stacks and queues as "fringe"
combinatorial loops
- Johnson Trotter (already mentioned)
- factoradic numbers (see wikipedia:factoradic
- all subsets
- binary reflected Gray codes
other
- fake-coin problem (divide by 3)
- Josephus problem
- Finding the median
- interpolation search
- game of Nim