Themes from Homework 1

Runtime

  1. Plain language writeup
  2. Convert into O(N)
  3. Return largest magnitude

Greedy Algorithms

How to prove greedy

  1. Clearly define counterfactuals
  2. Show why counterfactuals never happen
  3. Assume an optimal solution, adding the next step is still optimal

Proof of Interval Scheduling