Greedy

From workshop

From bruce force, to a perfect solution.

From local optimum to a whole optinum. According to experience.

Steps

  1. Determine wether can use Greedy
  2. Choose the strategy of Greddy
  3. Calculate

Some samples

  1. Arrange the activitices
    • Minuim end time of meeting
  2. Minunm sum of weight of tree from graph
    • Prim
    • Krusal
  3. Huffman coding
    prefix-tree binary code; choose the two min weighted elements to be the leaves of tree(from down to up)