Introduction
Greedy algorithm is an algorithm that
- computes the solution in steps
- at each step, it makes decision that is locally optimum
The greedy algorithm does not necessarily produce the optimum solution.
Problem
Leetcode problems:
- 455 assign cookies
- 452 minimum number of arrows to burst balloons
- 122 best time to buy and sell stock II
- 605 can place flowers